KiCad 9.0 参考手册

KiCad 9.0 Reference Manual

本手册正在修订中,以涵盖 KiCad 的最新稳定版本。部分章节尚未完成。我们的志愿者技术撰稿人正在努力完善这些章节,敬请您耐心等待。我们也欢迎新的贡献者加入,共同改进 KiCad 的文档。

本文档版权归以下列出的贡献者所有 © 2010-2024。您可以根据 GNU 通用公共许可证(http://www.gnu.org/licenses/gpl.html)第 3 版或更高版本,或知识共享署名许可证(http://creativecommons.org/licenses/by/3.0/)第 3.0 版或更高版本的条款分发和/或修改本文档。

This document is Copyright © 2010-2024 by its contributors as listed below. You may distribute it and/or modify it under the terms of either the GNU General Public License (http://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0/), version 3.0 or later.

本指南中出现的所有商标均属于其合法所有者。

All trademarks within this guide belong to their legitimate owners.

贡献者

Contributors

让-皮埃尔·查拉斯、法布里奇奥·塔佩罗、韦恩·斯坦博、格雷厄姆·基思

Jean-Pierre Charras, Fabrizio Tappero, Wayne Stambaugh, Graham Keeth

反馈

Feedback

KiCad 项目欢迎您就软件或其文档提出反馈、错误报告和建议。有关如何提交反馈或报告问题的更多信息,请参阅https://www.kicad.org/help/report-an-issue/上的说明。

The KiCad project welcomes feedback, bug reports, and suggestions related to the software or its documentation. For more information on how to submit feedback or report an issue, please see the instructions at https://www.kicad.org/help/report-an-issue/

软件和文档版本

Software and Documentation Version

本用户手册基于 KiCad 9.0.7 版本。其他版本的 KiCad 的功能和外观可能有所不同。

This user manual is based on KiCad 9.0.7. Functionality and appearance may be different in other versions of KiCad.

文档修订:79bdb77e

Documentation revision: 79bdb77e.

KiCad原理图编辑器简介

Introduction to the KiCad Schematic Editor

KiCad原理图编辑器是一款原理图捕获应用程序,作为KiCad的一部分分发,适用于以下操作系统:

The KiCad Schematic Editor is a schematic capture application distributed as a part of KiCad and available for the following operating systems:

  • Linux

  • Linux

  • 苹果 macOS

  • Apple macOS

  • 视窗

  • Windows

无论使用何种操作系统,所有 KiCad 文件在不同操作系统之间都 100% 兼容。

Regardless of the OS, all KiCad files are 100% compatible from one OS to another.

原理图编辑器是一个集成应用程序,原理图绘制、PCB封装选择、库管理以及与PCB设计软​​件之间的数据传输等所有功能都在编辑器本身中完成。

The Schematic Editor is an integrated application where all functions of schematic drawing, PCB footprint selection, library management, and data transfer to and from the PCB design software are carried out within the editor itself.

KiCad原理图编辑器旨在与KiCad PCB编辑器直接通信,无需任何中间文件即可设计印刷电路板。它还可以导出列出所有电气连接的网表文件,以供其他软件包使用。

The KiCad Schematic Editor is intended to communicate directly with the KiCad PCB Editor for designing printed circuit boards without using any intermediate files. It can also export netlist files, which list all the electrical connections, for other packages.

原理图编辑器包含一个符号库编辑器,可以创建和编辑符号以及管理符号库。它还集成了现代原理图绘制软件所需的以下其他重要功能:

The Schematic Editor includes a symbol library editor, which can create and edit symbols and manage libraries. It also integrates the following additional but essential functions needed for modern schematic capture software:

  • 电气规则检查 (ERC) 用于自动检测错误和缺失的连接

  • Electrical rules check (ERC) for automatic detection of incorrect and missing connections

  • 使用 ngspice 进行电路仿真

  • Circuit simulation using ngspice

  • 支持导出多种格式的绘图文件(Postscript、PDF、HPGL 和 SVG)

  • Export of plot files in many formats (Postscript, PDF, HPGL, and SVG)

  • 物料清单生成(通过 Python 或 XSLT 脚本,支持多种灵活格式)。

  • Bill of Materials generation (via Python or XSLT scripts, which allow many flexible formats).

原理图编辑器支持多种多页原理图:

The Schematic Editor supports multi-sheet schematics in several ways:

  • 扁平化层级结构(示意图在主图中没有明确连接)。

  • Flat hierarchies (schematic sheets are not explicitly connected in a master diagram).

  • 简单的层级结构(每个原理图仅使用一次)。

  • Simple hierarchies (each schematic sheet is used only once).

  • 复杂的层级结构(有些示意图被多次使用)。

  • Complex hierarchies (some schematic sheets are used multiple times).

分层示意图将在手册后面详细描述 。

Hierarchical schematics are described in detail later in the manual.

初始配置

Initial Configuration

首次运行原理图编辑器时,如果sym-lib-tableKiCad 配置文件夹中找不到全局符号库表文件,KiCad 将询问如何创建此文件:

When the Schematic Editor is run for the first time, if the the global symbol library table file sym-lib-table is not found in the KiCad configuration folder then KiCad will ask how to create this file:

符号库表初始配置

建议选择第一种方案(复制默认全局符号库表(推荐))。默认符号库表包含 KiCad 安装的所有标准符号库。

The first option is recommended (Copy default global symbol library table (recommended)). The default symbol library table includes all of the standard symbol libraries that are installed as part of KiCad.

如果禁用此选项,KiCad 将无法找到默认的全局符号库表。这可能意味着您没有随 KiCad 安装标准符号库,或者它们没有安装在 KiCad 预期的位置。在某些系统中,KiCad 库是作为单独的软件包安装的。

If this option is disabled, KiCad was unable to find the default global symbol library table. This probably means you did not install the standard symbol libraries with KiCad, or they are not installed where KiCad expects to find them. On some systems the KiCad libraries are installed as a separate package.

  • 如果您已安装标准 KiCad 符号库并想使用它们,但第一个选项被禁用,请选择第二个选项,然后浏览到sym-lib-tableKiCad 库安装目录中的文件。

  • If you have installed the standard KiCad symbol libraries and want to use them, but the first option is disabled, select the second option and browse to the sym-lib-table file in the directory where the KiCad libraries were installed.

  • 如果您已经有想要使用的自定义符号库表,请选择第二个选项并浏览到您的sym-lib-table文件。

  • If you already have a custom symbol library table that you would like to use, select the second option and browse to your sym-lib-table file.

  • 如果要从头开始构建一个新的符号库表,请选择第三个选项。

  • If you want to construct a new symbol library table from scratch, select the third option.

符号库管理,包括如何重新运行此初始配置,将在后面详细介绍。

Symbol library management, including how to re-run this initial configuration, is described in more detail later.

原理图编辑器用户界面

The Schematic Editor User Interface

原理图编辑器概述

上图所示为原理图编辑器的主用户界面。中心区域为主编辑画布,周围环绕着:

The main Schematic Editor user interface is shown above. The center contains the main editing canvas, which is surrounded by:

Navigating the editing canvas

编辑画布会显示正在设计的原理图。您可以平移和缩放原理图的不同部分,并打开设计中的任何原理图页。

The editing canvas displays the schematic being designed. You can pan and zoom to different parts of the schematic and open any schematic sheet in the design.

默认情况下,使用鼠标中键或右键拖动会平移画布视图,滚动鼠标滚轮会放大或缩小视图。您可以在首选项的“鼠标和触摸板”部分更改此行为(有关详细信息,请参阅 “配置和自定义”)。

By default, dragging with the middle or right mouse button will pan the canvas view and scrolling the mouse wheel will zoom the view in or out. You can change this behavior in the Mouse and Touchpad section of the preferences (see Configuration and Customization for details).

顶部工具栏中还提供了其他几种缩放工具:

Several other zoom tools are available in the top toolbar:

  • 放大图标放大视口中心区域。

  • zooms in on the center of the viewport.

  • 缩小图标从视口中心向外缩放。

  • zooms out from the center of the viewport.

  • 缩放至页面图标缩放画面以适应图纸周围的区域。

  • zooms to fit the frame around the drawing sheet.

  • 缩放至对象图标缩放功能可使原理图中的所有元素(不包括图纸本身)都显示出来。例如,如果某些元素位于图纸之外,则在缩放至对象后,这些元素也会显示出来。

  • zooms to fit every item in the schematic (not including the drawing sheet). For instance, if there are items placed outside of the drawing sheet, they will be visible after zooming to objects.

  • 缩放至选定图标允许您绘制一个框来确定缩放区域。

  • allows you to draw a box to determine the zoomed area.

光标的当前位置显示在窗口底部(X 和 Y),同时还会显示当前缩放因子(Z)、光标的相对位置(dx、dy 和 dist)、网格设置和显示单位。

The cursor’s current position is displayed at the bottom of the window (X and Y), along with the current zoom factor (Z), the cursor’s relative position (dx, dy, and dist), the grid setting, and the display units.

按下按钮可以将相对坐标重置为零Space。这对于测量两点之间的距离或对齐物体非常有用。

The relative coordinates can be reset to zero by pressing Space. This is useful for measuring distance between two points or aligning objects.

快捷键

Hotkeys

Ctrl“+”F1快捷键可显示当前热键列表。默认热键列表请参阅手册的“操作参考”部分。

The Ctrl+F1 shortcut displays the current hotkey list. The default hotkey list is included in the Actions Reference section of the manual.

本手册中描述的热键使用的是标准 PC 键盘上的按键标签。在 Apple 键盘布局中,请使用Cmd键代替Ctrl,使用Option键代替Alt

The hotkeys described in this manual use the key labels that appear on a standard PC keyboard. On an Apple keyboard layout, use the Cmd key in place of Ctrl, and the Option key in place of Alt.

许多操作默认情况下没有分配热键,但可以使用热键编辑器(首选项首选项…热键)分配或重新定义热键。

Many actions do not have hotkeys assigned by default, but hotkeys can be assigned or redefined using the hotkey editor (PreferencesPreferences…​Hotkeys).

许多可通过快捷键执行的操作也可在上下文菜单中找到。要访问上下文菜单,请在编辑画布上单击鼠标右键。根据所选内容或当前激活的工具,可用的操作会有所不同。

快捷键存储user.hotkeys在 KiCad 配置目录下的文件中。具体位置因平台而异:

Hotkeys are stored in the file user.hotkeys in KiCad’s configuration directory. The location is platform-specific:

  • 视窗:%APPDATA%\kicad\9.0\user.hotkeys

  • Windows: %APPDATA%\kicad\9.0\user.hotkeys

  • Linux:~/.config/kicad/9.0/user.hotkeys

  • Linux: ~/.config/kicad/9.0/user.hotkeys

  • macOS:~/Library/Preferences/kicad/9.0/user.hotkeys

  • macOS: ~/Library/Preferences/kicad/9.0/user.hotkeys

KiCad 可以user.hotkeys使用热键编辑器中的“导入热键”按钮从文件中导入热键设置。

KiCad can import hotkey settings from a user.hotkeys file using the Import Hotkeys button in the hotkey editor.

选择和选择过滤器

Selection and the selection filter

在编辑画布中选择项目时,使用鼠标左键。单击对象即可选中它。单击并拖动鼠标可进行框选。从左到右的框选只会选中完全位于框内的项目。从右到左的框选会选中与框相邻的所有项目。从左到右的框选框以黄色显示,光标指示为排除选择;从右到左的框选框以蓝色显示,光标指示为包含选择。

Selecting items in the editing canvas is done with the left mouse button. Single-clicking on an object will select it. Clicking and dragging will perform a box selection. A box selection from left to right will only select items that are fully inside the box. A box selection from right to left will select any items that touch the box. A left-to-right selection box is drawn in yellow, with a cursor that indicates exclusive selection, and a right-to-left selection box is drawn in blue with a cursor that indicates inclusive selection.

按住修饰键并单击或拖动即可修改选择操作。单击选择单个项目时,可使用以下修饰键:

The selection action can be modified by holding modifier keys while clicking or dragging. The following modifier keys apply when clicking to select single items:

修饰键(Windows) 修饰键(Linux) 修饰键(macOS) 选择效应

Ctrl

Ctrl

Ctrl

Ctrl

Cmd

Cmd

切换选择。

Toggle selection.

Shift

Shift

Shift

Shift

Shift

Shift

将该项目添加到现有选择中。

Add the item to the existing selection.

Ctrl+Shift

Ctrl+Shift

Ctrl+Shift

Ctrl+Shift

Cmd+Shift

Cmd+Shift

从现有选择中移除该项目。

Remove the item from the existing selection.

长按

long click

长按或Alt

long click or Alt

长按或Option

long click or Option

从弹出菜单中明确选择。

Clarify selection from a pop-up menu.

在拖动鼠标进行框选时,可以使用以下修饰键:

The following modifier keys apply when dragging to perform a box selection:

修饰键(Windows) 修饰键(Linux) 修饰键(macOS) 选择效应

Ctrl

Ctrl

Ctrl

Ctrl

Cmd

Cmd

切换选择。

Toggle selection.

Shift

Shift

Shift

Shift

Shift

Shift

将商品添加到现有选择中。

Add item(s) to the existing selection.

Ctrl+Shift

Ctrl+Shift

Ctrl+Shift

Ctrl+Shift

Cmd+Shift

Cmd+Shift

从现有选择中移除项目。

Remove item(s) from the existing selection.

原理图编辑器窗口左下角的选择筛选面板控制着可以使用鼠标选择哪些类型的对象。关闭不需要的对象类型的选择,可以更轻松地在复杂的原理图中选择项目。“所有项目”复选框是启用和禁用其他项目的快捷方式。您可以右键单击选择筛选器中的任何对象类型,快速更改筛选条件,使其仅允许选择该类型的对象。

The selection filter panel in the lower left corner of the Schematic Editor window controls which types of objects can be selected with the mouse. Turning off selection of unwanted object types makes it easier to select items in a busy schematic. The "All items" checkbox is a shortcut to turn the other items on and off. You can right-click any object type in the selection filter to quickly change the filter to only allow selecting that type of object.

选择过滤器

选中对象后,窗口底部的消息面板会显示该对象的信息。双击对象会打开一个窗口,用于编辑对象的属性。

Selecting an object displays information about the object in the message panel at the bottom of the window. Double-clicking an object opens a window to edit the object’s properties.

按下此键Esc将始终取消当前工具或操作,并返回到选择工具。Esc在选择工具处于活动状态时按下此键将清除当前选择。

Pressing Esc will always cancel the current tool or operation and return to the selection tool. Pressing Esc while the selection tool is active will clear the current selection.

左侧工具栏显示控件

Left toolbar display controls

左侧工具栏提供了更改原理图编辑器中项目显示方式的选项。

The left toolbar provides options to change the display of items in the Schematic Editor.

网格可见性图标

打开/关闭网格显示。

Turns grid display on/off.

注意:默认情况下,隐藏网格不会禁用网格对齐功能。此行为可在“首选项”的“显示选项”部分中更改。

Note: by default, hiding the grid does not disable grid snapping. This behavior can be changed in the Display Options section of Preferences.

网格覆盖启用按钮

开启/关闭针对特定项目的网格覆盖设置

Turns item-specific grid overrides on/off.

英寸单位图标

密尔单位图标

毫米单位图标

以英寸、密位或毫米为单位显示/输入坐标和尺寸。

Display/entry of coordinates and dimensions in inches, mils, or millimeters.

光标形状图标

在全屏和小编辑光标(十字准星)之间切换。

Switches between full-screen and small editing cursor (crosshairs).

隐藏的图钉图标

打开/关闭隐形针脚显示。

Turns invisible pin display on/off.

自由角度线图标

90度角线图标

45度角线图标

在自由角度、90 度模式和 45 度模式之间切换,用于放置新的导线、总线和图形形状。

Switches between free angle, 90 degree mode, and 45 degree mode for placement of new wires, buses, and graphical shapes.

自动注释图标

启用/禁用自动符号注释功能。启用后,符号添加到原理图时,其参考标识符将自动设置为可用的最低参考标识符。

Turns automatic symbol annotation on/off. When on, symbols will have their reference designators automatically set to the lowest available reference when they are added to the schematic.

层级导航图标

打开和关闭停靠的层级导航器面板。

Opens and closes the docked Hierarchy Navigator panel.

物业管理器图标

打开和关闭停靠的属性管理器面板。

Opens and closes the docked Properties Manager panel.

原理图创建与编辑

Schematic Creation and Editing

介绍

Introduction

使用 KiCad 设计的原理图不仅仅是电子设备的简单图形表示。它通常是开发流程的入口点,可以用于:

A schematic designed with KiCad is more than a simple graphic representation of an electronic device. It is normally the entry point of a development chain that allows for:

原理图主要由符号、导线、标签、连接点、母线和电源符号组成。为了使原理图更清晰,您可以添加纯图形元素,例如母线输入、注释和折线。

A schematic mainly consists of symbols, wires, labels, junctions, buses and power symbols. For clarity in the schematic, you can place purely graphical elements like bus entries, comments, and polylines.

从符号库向原理图添加符号。原理图完成后,将连接和封装导入PCB编辑器进行电路板设计。

Symbols are added to the schematic from symbol libraries. After the schematic is made, the set of connections and footprints is imported into the PCB editor for designing a board.

原理图可以包含在单个图纸中,也可以分布在多个图纸上。在 KiCad 中,多图纸原理图采用层级结构,包含根图纸和子图纸。每个图纸都是一个独立的.kicad_sch文件,并且本身就是一个完整的 KiCad 原理图。有关如何使用层级原理图,请参阅“层级原理图”章节。

Schematics can be contained in a single sheet or split among multiple sheets. In KiCad, multi-sheet schematics are organized hierarchically, with a root sheet and sub-sheet(s). Each sheet is its own .kicad_sch file and is itself a complete KiCad schematic. Working with hierarchical schematics is described in the Hierarchical Schematics chapter.

原理图编辑操作

Schematic editing operations

原理图编辑工具位于右侧工具栏。工具激活后,会一直保持激活状态,直到选择其他工具或使用快捷键取消为止Esc。取消任何其他工具时,选择工具始终处于激活状态。

Schematic editing tools are located in the right toolbar. When a tool is activated, it stays active until a different tool is selected or the tool is canceled with the Esc key. The selection tool is always activated when any other tool is canceled.

选择工具图标

选择工具(默认工具)

Selection tool (the default tool)

高亮网络图标

通过用不同颜色标记网络的导线和网络标签来高亮显示网络。如果 PCB 编辑器也已打开,则与所选网络对应的铜箔也会被高亮显示。可以使用高亮工具在空白处单击来清除网络高亮显示,或者使用清除网络高亮显示的快捷键(~)。

Highlight a net by marking its wires and net labels with a different color. If the PCB Editor is also open then copper corresponding to the selected net will be highlighted as well. Net highlighting can be cleared by clicking with the highlight tool in an empty space, or by using the Clear Net Highlighting hotkey (~).

新符号图标

显示符号选择对话框以放置新符号。

Display the symbol selector dialog to place a new symbol.

添加电源图标

显示电源符号选择对话框,以放置新的电源符号。

Display the power symbol selector dialog to place a new power symbol.

绘制导线图标

画一根导线

Draw a wire.

绘制公交车图标

画一辆公共汽车

Draw a bus.

绘制导线到总线图标

绘制导线到总线的入口点。这些元素仅用于图形化表示,并不创建实际连接,因此不应用于连接导线。

Draw wire-to-bus entry points. These elements are only graphical and do not create a connection, thus they should not be used to connect wires together.

绘制无连接旗帜图标

放置“未连接”标志。这些标志应放置在需要保持未连接的符号引脚上。“未连接”标志会向电气规则检查器表明该引脚是故意未连接的,而不是错误。它们还会影响堆叠符号引脚的原理图连接。

Place a "no-connection" flag. These flags should be placed on symbol pins which are meant to be left unconnected. "No-connection" flags indicate to the Electrical Rule Checker that the pin is intentionally unconnected and not an error. They also affect schematic connectivity for stacked symbol pins.

放置交汇点图标

放置一个接线端子。它可以连接两条交叉的导线或一根导线和一个引脚,如果没有接线端子,有时会造成歧义(例如,如果导线的一端或引脚没有直接连接到另一根导线的一端)。

Place a junction. This connects two crossing wires or a wire and a pin, which can sometimes be ambiguous without a junction (i.e. if a wire end or a pin is not directly connected to another wire end).

本地标签图标

添加本地标签。本地标签用于连接同一工作表中的项目。要连接两个不同工作表之间的项目,请使用全局标签或层级标签。

Place a local label. Local labels connect items located in the same sheet. For connections between two different sheets, use global or hierarchical labels.

网类指令图标

放置网络类指令标签

Place a net class directive label.

指令规则区域图标

放置指令规则区域

Place a directive rule area.

全局标签图标

放置全局标签。所有同名的全局标签都会关联起来,即使它们位于不同的工作表上。

Place a global label. All global labels with the same name are connected, even when located on different sheets.

层级标签图标

放置层级标签。层级标签用于在子图纸和父图纸之间建立连接。 有关层级标签、图纸和引脚的更多信息,请参阅“层级原理图”部分。

Place a hierarchical label. Hierarchical labels are used to create a connection between a subsheet and the sheet’s parent sheet. See the Hierarchical Schematics section for more information about hierarchical labels, sheets, and pins.

层级子表图标

放置一个层级子工作表。您必须指定此子工作表的文件名。

Place a hierarchical subsheet. You must specify the file name for this subsheet.

添加层级引脚 24

层级图钉放置在与目标图纸中添加的层级标签对应的图纸上。

Place a hierarchical sheet pin on a sheet corresponding to a hierarchical label that has been added in the target sheet.

导入层级标签图标

同步层级图纸图钉和层级标签。这将显示每个子图纸中所有层级标签的列表,并允许您管理相应的层级图纸图钉。

Sync hierarchical sheet pins and hierarchical labels. This displays a list of all the hierarchical labels in each subsheet and lets you manage the corresponding hierarchical sheet pins.

放置文本图标

插入文本

Place text.

放置文本框图标

放置一个文本框

Place a text box.

放置桌子图标

摆放一张桌子

Place a table.

绘制矩形图标

画一个矩形

Draw a rectangle.

绘制圆形图标

画一个圆

Draw a circle.

绘制弧形图标

画一个弧线

Draw an arc.

绘制贝塞尔曲线图标

绘制贝塞尔曲线

Draw a bezier curve.

绘制线条图标

绘制图形线条

Draw graphic lines.

注意:线条是图形对象,与使用“导线”工具放置的导线不同。它们并不连接任何物体。

Note: Lines are graphical objects and are not the same as wires placed with the Wire tool. They do not connect anything.

放置位图图标

放置一张位图图像

Place a bitmap image.

交互式删除工具图标

删除已点击的项目。

Delete clicked items.

网格和吸附

Grids and snapping

在移动、拖动和绘制原理图元素(例如符号、导线、文本和图形线条)时,它们会自动吸附到网格上。此外,即使禁用网格吸附,导线和标签工具也会吸附到其他连接的元素(例如引脚、导线和标签)上。

Schematic elements such as symbols, wires, text, and graphic lines are snapped to the grid when moving, dragging, and drawing them. Additionally, the wire and label tools snap to other connected items such as pins, wires, and labels even when grid snapping is disabled.

在移动鼠标时,可以使用下表中的修饰键禁用网格捕捉和连接对象捕捉。

Both grid and connected object snapping can be disabled while moving the mouse by using the modifier keys in the table below.

在苹果键盘上,请使用该Cmd键代替Ctrl
修饰键 影响

Ctrl

Ctrl

禁用网格对齐。

Disable grid snapping.

Shift

Shift

禁用连接对象吸附。

Disable connected object snapping.

默认网格尺寸为 50 mil(0.050 英寸)或 1.27 毫米。这是在原理图中放置符号和导线以及在符号编辑器中设计符号时放置引脚的推荐网格尺寸。也可以使用更小的网格,但这仅适用于文本和符号图形,不建议用于放置引脚和导线。

The default grid size is 50 mil (0.050") or 1.27 millimeters. This is the recommended grid for placing symbols and wires in a schematic and for placing pins when designing a symbol in the Symbol Editor. Smaller grids can also be used, but this is intended only for text and symbol graphics, and not recommended for placing pins and wires.

只有当导线的末端 完全重合时,导线才能与其他导线或引脚连接。因此,保持符号引脚和导线与网格对齐至关重要。建议在放置符号和绘制导线时始终使用 50 mil 网格,因为 KiCad 标准符号库以及所有遵循其风格的库都使用 50 mil 网格。 使用 50 mil 以外的网格尺寸会导致原理图连接不正确!
选中未与网格对齐的符号、线段和其他元素,右键单击,然后单击 “将元素对齐到网格”,即可将其恢复到网格上。

您可以通过右键单击并从“网格”子菜单的列表中选择新的网格来调整网格大小。按下快捷键nN将分别循环切换到列表中的下一个和上一个网格。

You can adjust the grid size by right-clicking and selecting a new grid from the list in the Grid submenu. Pressing the n or N hotkeys will cycle to the next and previous grid in the list, respectively.

您也可以在首选项对话框的“网格”窗格中选择新的网格或编辑现有网格。要快速打开此对话框,请右键单击 显示网格按钮左侧工具栏上的按钮,然后选择“编辑网格…”

You can also select a new grid or edit the available grids in the Grids pane of the preferences dialog. As a shortcut to reach this dialog, right click the button on the left toolbar and select Edit Grids…​.

网格设置对话框

在此对话框中,您可以从网格列表中选择活动网格,重新排序网格列表(小到16/ 小幅下降 16),以及添加(小加16)、删除(小垃圾 16)或编辑(小修改 16)网格。在此对话框中定义的网格可以具有不相等的 X 和 Y 间距,并且可以选择指定名称。网格间距和名称在创建或编辑网格时指定。

In this dialog you can select an active grid from the list of grids, reorder the list of grids ( / ), and add (), remove (), or edit () grids. Grids defined in this dialog can have unequal X and Y spacing as well as an optional name. The grid spacing and name are specified when you create or edit a grid.

此对话框还允许您从列表中指定两个网格为“快速网格”,可以使用Alt+1Alt+2快速选择它们。

This dialog also lets you designate two grids from the list as "Fast Grids", which can be quickly selected using Alt+1 and Alt+2.

最后,您可以为不同类型的对象配置网格覆盖。网格覆盖允许您为不同类型的对象设置特定的网格大小,这些网格将在处理这些对象时代替默认网格使用。例如,您可以为导线和连接项设置 50 mil 的网格,同时使用更小的网格来精细定位文本和图形。您可以在此对话框中单独启用和禁用网格覆盖,也可以使用 网格覆盖启用按钮左侧工具栏上的按钮 ( Ctrl++ShiftG )全局启用和禁用网格覆盖。

Finally, you can configure grid overrides for different types of objects. Grid overrides let you set particular grid sizes for different types of objects which will be used instead of the default grid when working with those objects. For example, you can set a 50 mil grid for wires and connected items while using smaller grids to finely position text and graphics. Grid overrides can be individually enabled and disabled in this dialog, or globally enabled and disabled using the button on the left toolbar (Ctrl+Shift+G).

网格的视觉外观也可以通过多种方式进行自定义。您可以在首选项对话框的“显示选项”页面中更改网格标记的粗细、切换其形状(点、线或十字),以及设置最小显示间距;您还可以在首选项对话框的“颜色”页面 中更改网格颜色 。

The visual appearance of the grid can also be customized in several ways. You can change the thickness of the grid markings, switch their shape (dots, lines, or crosses), and set the minimum displayed spacing in the Display Options page of the preferences dialog, and you can change the grid color in the Colors page of the preferences dialog.

显示网格按钮您可以使用左侧工具栏上的按钮显示或隐藏网格 。默认情况下,即使网格处于隐藏状态,它仍然会显示,但您可以在“显示选项”首选项页面中进行配置。您可以在此处设置网格在隐藏时禁用,甚至可以完全禁用网格。

The grid can be shown or hidden using the button on the left-hand toolbar. By default the grid is still active even if it is hidden, but this is configurable in the Display Options preferences page. There you can set the grid to be disabled when it is hidden or even disable the grid entirely.

编辑对象属性

Editing object properties

所有对象都具有可在对话框中编辑的属性。使用快捷键 E或从右键单击上下文菜单中选择“属性”来编辑所选项目的属性。只有当所有选定的项目类型相同时,才能打开属性对话框。对于许多对象类型(例如符号),一次只能编辑一个项目的属性。要同时编辑多个项目(包括不同类型的项目)的属性,可以使用属性管理器。

All objects have properties that are editable in a dialog. Use the hotkey E or select Properties from the right-click context menu to edit the properties of selected item(s). You can only open the properties dialog if all the items you have selected are of the same type. For many object types, like symbols, you can only edit the properties of a single item at one time. To edit the properties of multiple items at once, including items with different types, you can use the Properties Manager.

符号属性对话框

您一次只能使用属性对话框编辑一个项目。要编辑多个项目,请使用下文所述的属性管理器。此外,还有其他工具可用于批量编辑特定类型的对象,例如用于编辑 文本、符号字段、标签和图形形状的视觉属性的“编辑文本和图形”工具,以及用于批量编辑符号字段的“符号字段表”

You can only use the properties dialog to edit one item at a time. To edit multiple items, use the Properties Manager, described below. There are also other tools that can be used to edit specific types of objects in bulk, such as the Edit Text and Graphics tool for editing visual properties of text, symbol fields, labels, and graphic shapes, or the Symbol Fields Table for editing symbol fields in bulk.

您还可以使用属性管理器查看和编辑项目属性。属性管理器是一个停靠面板,用于显示所选项目或多个项目的属性以供编辑。如果同时选择了多种类型的项目,属性面板将仅显示所有选定项目类型共有的属性。

You can also view and edit item properties using the Properties Manager. The Properties Manager is a docked panel that displays the properties of the selected item or items for editing. If multiple types of items are selected at once, the properties panel displays only the properties shared by all of the selected item types.

属性管理器显示符号的属性

在属性管理器中编辑属性会立即应用更改。选择多个项目时,属性修改会分别应用于每个选定项目,而不是应用于整个选定组。例如,更改多个项目的方向时,每个项目会分别绕其自身的原点旋转,而不是绕组的原点旋转。

Editing a property in the Properties Manager immediately applies the change. When multiple items are selected, property modifications are applied to each selected item individually, not to the whole selection as a group. For example, when changing the orientation of multiple items, each item is individually rotated around its own origin, not the group’s origin.

通过“视图”“面板”“属性”物业管理器图标左侧工具栏上的按钮显示属性管理器。

Show the Properties Manager with ViewPanelsProperties or the button on the left toolbar.

在属性对话框和许多其他对话框中,任何包含数值的字段也可以接受一个基本的数学表达式,该表达式的结果也是数值。

In properties dialogs and many other dialogs, any field that contains a numeric value can also accept a basic math expression that results in a numeric value.

例如,维度可以输入为2 * 2mm,结果为 4mm。支持基本算术运算符以及用于定义运算顺序的括号。还可以指定单位,单位转换会自动执行,因此1in + 1mm计算结果为26.4mm

For example, a dimension may be entered as 2 * 2mm, resulting in a value of 4mm. Basic arithmetic operators as well as parentheses for defining order of operations are supported. Units can also be specified, and unit conversions are performed automatically, so 1in + 1mm evaluates to 26.4mm.

使用符号

Working with symbols

放置符号

Placing symbols

要在原理图中放置符号,请使用 新符号图标按钮或A 快捷键。此时将出现“选择符号”对话框,您可以在其中选择要添加的符号。符号按符号库分组。

To place a symbol in your schematic, use the button or the A hotkey. The Choose Symbols dialog appears and lets you select a symbol to add. Symbols are grouped by symbol library.

选择组件对话框

默认情况下,仅显示符号/库名称和描述列。右键单击列标题并选择“选择列”即可添加其他列。

By default, only the symbol/library name and description columns are shown. Additional columns can be added by right-clicking the column header and selecting Select Columns.

“选择符号”对话框会根据您在搜索框中输入的内容,按名称、关键字、描述以及所有其他符号字段筛选符号。您可以点击按钮选择按字母顺序或按最佳匹配度对搜索结果进行排序排序按钮

The Choose Symbol dialog filters symbols by name, keywords, description, and all additional symbol fields according to what you type into the search field. You can choose to sort search results alphabetically or by best match by clicking on the button.

提供一些高级筛选器:

Some advanced filters are available:

  • 通配符: *可以匹配任意数量的任意字符(包括零个字符),也? 可以匹配单个字符。

  • Wildcards: * matches any number of any characters, including none, and ? matches any single character.

  • 键值对:如果库部件的描述或关键字包含格式为“Key:123”的标签,则可以通过输入“Key>123”(大于)、“Key<123”(小于)等方式进行匹配。数字可以包含以下不区分大小写的后缀之一:

    p

    n

    k

    巨石

    t

    10-12

    10-9

    10-6

    10 -3

    10 3

    10 6

    10 9

    10 12

    ki

    gi

    ti

    2 10

    2 20

    2 30

    2 40

  • Key-value pairs: if a library part’s description or keywords contain a tag of the format "Key:123", you can match relative to that by typing "Key>123" (greater than), "Key<123" (less than), etc. Numbers may include one of the following case-insensitive suffixes:

    p

    n

    u

    m

    k

    meg

    g

    t

    10-12

    10-9

    10-6

    10-3

    103

    106

    109

    1012

    ki

    mi

    gi

    ti

    210

    220

    230

    240

  • 正则表达式:如果您熟悉正则表达式,也可以使用它们。这里使用的是 wxWidgets 高级正则表达式风格,它类似于 Perl 正则表达式。

  • Regular expressions: if you’re familiar with regular expressions, these can be used too. The regular expression flavor used is the wxWidgets Advanced Regular Expression style, which is similar to Perl regular expressions.

如果符号指定了默认封装,则会在右下角预览该封装。如果符号包含封装筛选器,则可以在右侧的封装下拉菜单中选择符合筛选条件的备选封装。

If the symbol specifies a default footprint, this footprint will be previewed in the lower right. If the symbol includes footprint filters, alternate footprints that satisfy the footprint filters can be selected in the footprint dropdown menu at right.

选择要放置的符号后,该符号将附加到光标上。在原理图中左键单击所需位置即可将符号放置到原理图中。在将符号放置到原理图之前,您可以使用快捷键或右键单击上下文菜单旋转、镜像符号并编辑其字段。这些操作也可以在放置后执行。

After selecting a symbol to place, the symbol will be attached to the cursor. Left clicking the desired location in the schematic places the symbol into the schematic. Before placing the symbol in the schematic, you can rotate it, mirror it, and edit its fields, by either using the hotkeys or the right-click context menu. These actions can also be performed after placement.

如果选中“放置重复副本”选项,KiCad 在放置一个符号后会开始放置该符号的另一个副本。此过程会一直持续到用户按下停止键为止Esc

If the Place repeated copies option is checked, after placing a symbol KiCad will start placing another copy of the symbol. This process continues until the user presses Esc.

对于包含多个单位的符号,如果选中“放置所有单位”选项,KiCad 在放置符号后将开始放置下一个单位。此过程将持续到放置完最后一个单位或用户按下 Esc.

For symbols with multiple units, if the Place all units option is checked, after placing the symbol KiCad will start placing the next unit in the symbol. This continues until the last unit has been placed or the user presses Esc.

放置权力符号

Placing power symbols

电源符号是代表与电源网络连接的符号。这些符号已分组存储在power符号库中,因此可以使用符号选择器进行放置。然而,由于电源放置操作频繁,因此也提供了一个 工具。该工具与符号选择器类似,区别在于它直接在符号库以及任何其他包含电源符号的符号库添加电源图标中进行搜索。power

A power symbol is a symbol representing a connection to a power net. The symbols are grouped in the power library, so they can be placed using the symbol chooser. However, as power placements are frequent, the tool is available. This tool is similar, except that the search is done directly in the power library and any other library that contains power symbols.

移动符号

Moving symbols

可以使用移动 ( M) 或拖动 ( G) 工具移动符号。这些工具作用于选定的符号;如果没有选择任何符号,则作用于光标下的符号。

Symbols can be moved using the Move (M) or Drag (G) tools. These tools act on the selected symbol, or if no symbol is selected they act on the symbol under the cursor.

移动工具会移动符号本身,而不会保持与符号引脚的有线连接

The Move tool moves the symbol itself without maintaining wired connections to the symbol pins.

拖动工具可以移动符号而不会断开与引脚的有线连接,因此也会移动连接的导线。

The Drag tool moves the symbol without breaking wired connections to its pins, and therefore moves the connected wires as well.

您还可以通过点击并拖动鼠标来拖动符号,具体取决于“首选项”中的“鼠标和触摸板”部分的“左键拖动手势”设置 。

You can also Drag symbols by clicking and dragging them with the mouse, depending on the Left button drag gesture setting in the Mouse and Touchpad section of Preferences.

R符号还可以沿 X ( X) 或 Y ( ) 方向旋转 ( ) 或镜像Y

Symbols can also be rotated (R) or mirrored in the X (X) or Y (Y) directions.

编辑符号属性

Editing symbol properties

原理图中的符号可以单独编辑,包括其属性(字段、特性等)、引脚和图形。编辑原理图中的符号只会影响该符号的特定实例;不会影响原理图中该符号的任何其他副本,也不会影响库符号。

Symbols in the schematic can be individually edited, both in terms of their properties (fields, attributes, etc.) and in terms of their pins and graphics. Editing a symbol in the schematic only affects that particular instance of the symbol; it does not affect any other copies of that symbol in the schematic, and it does not affect the library symbol.

要编辑原理图中符号的属性,请打开其属性对话框(E)。您也可以双击该符号。

To edit the properties of a symbol in the schematic, open its properties dialog (E). You can also double-click the symbol.

符号属性对话框

“符号属性”窗口以表格形式显示符号的所有字段。您可以添加新字段,也可以删除、编辑、重新排序、移动或调整现有字段的大小。字段可以任意命名,但以 `_` 开头的名称( ki_例如 ` _`)已被 KiCad 保留,不应用于用户自定义字段。当从原理图更新 PCBki_description时,所有符号字段都将添加到符号对应的封装中。

The Symbol Properties window displays all the fields of a symbol in a table. New fields can be added, and existing fields can be deleted, edited, reordered, moved, or resized. Fields can be arbitrarily named, but names beginning with ki_, e.g. ki_description, are reserved by KiCad and should not be used for user fields. All symbol fields will be added to the symbol’s corresponding footprint when the PCB is updated from the schematic.

每个字段的名称和值都可以显示或隐藏,并且有多种格式设置选项:水平和垂直对齐方式、方向、位置、字体、文本颜色、文本大小以及粗体/斜体。还可以为每个字段启用自动定位功能。对于正常显示的符号(不旋转或镜像),其显示位置始终相对于符号的锚点。

Each field’s name and value can be visible or hidden, and there are several formatting options: horizontal and vertical alignment, orientation, position, font, text color, text size, and bold/italic emphasis. Field autoplacement can also be enabled on a per-field basis. The displayed position is always indicated for a normally displayed symbol (no rotation or mirroring) and is relative to the anchor point of the symbol.

可以通过右键单击符号字段表的标题行并启用或禁用所需的列来显示或隐藏符号字段的格式选项。并非所有列都默认显示。

某些字段具有特殊行为:

Several fields have special behavior:

  • “封装”字段定义了电路板设计中哪个封装与符号相对应。选中“封装”字段后,您可以单击按钮 小型图书馆 16打开 封装选择器,为符号分配封装。有关分配封装的其他方法,请参阅“分配封装” 部分。

  • The Footprint field defines which footprint will correspond to the symbol in the board design. When the footprint field is selected, you can click the button to open the footprint chooser to assign a footprint to the symbol. See the Assigning Footprints section for other ways to assign footprints.

  • “数据表”字段可以包含制造商提供的符号数据表。您可以在编辑画布中右键单击符号,然后选择 “显示数据表” ( D) 以打开符号中列出的数据表。符号的数据表可以是本地文件,也可以是远程 URL(例如制造商网站)上的文件。您可以使用文件浏览器选择本地文件:在符号属性中选择“数据表”字段,然后单击按钮 www 16。如果在文件浏览器中启用“嵌入文件” 复选框,数据表将嵌入到原理图中,而不是作为外部文件引用。这意味着数据表可以在任何计算机上访问。有关更多信息,请参阅 嵌入文件文档

  • The Datasheet field can contain the manufacturer’s datasheet for the symbol. You can right click a symbol in the editing canvas and choose Show Datasheet (D) to open the datasheet listed in the symbol. A symbol’s datasheet can be a local file or a file at a remote URL, like the manufacturer’s website. You can choose a local file using a file browser by selecting the datasheet field in the symbol’s properties, then clicking the button. If you enable the Embed File checkbox in the file browser, the datasheet will be embedded in the schematic instead of being referenced as an an external file. This means the datasheet will be available on any computer. For more information, see the embedded files documentation.

符号具有多个属性,这些属性会影响 KiCad 其他部分对符号的处理方式。

Symbols have several attributes that affect how the symbols are treated by other parts of KiCad.

  • “从仿真中排除”功能可防止符号被包含在 SPICE 仿真中。被排除在仿真之外的符号会以灰色轮廓线环绕,并在其右下角显示一个仿真波形图标,如下图所示。轮廓线和图标的颜色可通过编辑所选配色方案中的“排除在仿真之外的标记”颜色进行配置。要完全禁用视觉标记(轮廓线和图标),请禁用“视图”“标记从仿真中排除的项”

  • Exclude from simulation prevents the symbol from being included in SPICE simulations. Symbols that are excluded from simulation are drawn with a grey outline around them and a simulation waveform icon to their bottom right, as shown below. The color of the outline and icon is configurable by editing the "Excluded-from-simulation Markers" color in the selected colorscheme. The visual marker (the outline and the icon) can be disabled completely by disabling ViewMark items which are excluded from simulation.

具有“排除在模拟之外”属性集的符号
  • 从物料清单中排除可防止该组件包含在 物料清单导出中

  • Exclude from bill of materials prevents the component from being included in BOM exports.

  • 从电路板中排除意味着该符号仅用于原理图,相应的封装不会添加到 PCB 上。

  • Exclude from board means that the symbol is schematic-only, and a corresponding footprint will not be added to the PCB.

  • “不安装”表示该元件不应连接到PCB上,但仍应在板上添加相应的封装。在原理图中,“不安装”符号会显示为低饱和度,并在其上方显示一个红色“X”,如下图所示。“X”的颜色可以通过编辑所选配色方案中的“不安装”标记颜色进行配置。

  • Do not populate means that the component should not be attached to the PCB, although a corresponding footprint should still be added to the board. DNP symbols appear desaturated and with a red "X" over them in the schematic, as shown below. The color of the "X" is configurable by editing the "DNP Markers" color in the selected colorscheme.

具有 DNP 属性集的符号

要编辑符号的形式,例如其引脚和图形,您需要使用符号编辑器。编辑器中有两个按钮用于打开符号,具体取决于您要编辑原理图中符号的单个副本,还是库中符号的源副本。

To edit the symbols’s form, i.e. its pins and graphics, you need to use the symbol editor. There are two buttons for opening a symbol in the editor, depending on whether you want to edit a single copy of a symbol in the schematic or a symbol’s source copy in the library.

  • “编辑符号…”将在符号编辑器中打开该符号的特定实例。编辑此符号只会影响原理图中该符号的这一个实例,不会影响原理图中该符号的其他实例,也不会影响符号库中的副本。您也可以通过在原理图中右键单击符号并选择 “使用符号编辑器编辑”Ctrl+E)来在符号编辑器中打开原理图符号。

  • Edit Symbol…​ will open the specific instance of the symbol in the symbol editor. Editing this symbol will only affect this one instance of the symbol in the schematic. It will not affect other instances of the symbol in the schematic, and it will not affect the library copy of the symbol. You can also open a schematic symbol in the symbol editor by right clicking the symbol in the schematic and selecting Edit with symbol editor (Ctrl+E).

  • “编辑库符号…” 将在符号编辑器中打开符号的库副本。编辑库副本符号会编辑符号库中的符号,但不会立即影响原理图中该符号的任何实例。要使用库符号的更改更新原理图中的符号,请使用“ 从库更新符号…”工具。以这种方式编辑库符号相当于打开符号编辑器,打开其库中的相应符号并对其进行编辑。

  • Edit Library Symbol…​ will open the library copy of the symbol in the symbol editor. Editing the library copy of the symbol will edit the symbol in the symbol library, but will not immediately affect any instances of that symbol in the schematic. To update symbols in the schematic with changes to the library symbol, use the Update Symbol from Library…​ tool. Editing the library symbol in this way is equivalent to opening the symbol editor, opening the appropriate symbol in its library, and editing it.

“从库更新符号…”按钮用于将原理图中的符号副本更新为与库中的副本一致。“更改符号…” 按钮用于将当前符号替换为库中的另一个符号。这些功能将 在后面详细介绍。

The Update Symbol from Library…​ button is used to update the schematic’s copy of the symbol to match the copy in the library. The Change Symbol…​ button is used to swap the current symbol to a different symbol in the library. These functions are described later.

仿真模型…”按钮打开 仿真模型编辑器,用于指定符号在SPICE 仿真中的行为。

The Simulation Model…​ button opens the Simulation Model Editor for specifying the symbol’s behavior in SPICE simulations.

单独编辑符号字段

可以使用快捷键(选中字段而不是符号)直接编辑单个符号文本字段,E或者双击该字段进行编辑。

An individual symbol text field can be edited directly with the E hotkey (with a field selected instead of a symbol) or by double-clicking on the field.

某些符号字段有自己的快捷键,可以直接编辑。选中符号后,可以使用快捷键分别编辑参考、值和U封装 V字段F

Some symbol fields have their own hotkey to edit them directly. With the symbol selected, the Reference, Value, and Footprint fields can be edited with the U, V, or F hotkeys, respectively.

编辑引用字段对话框

此对话框中的选项与完整的“符号属性”对话框中的选项相同,但仅适用于单个字段。

The options in this dialog are the same as those in the full Symbol Properties dialog, but are specific to a single field.

使用“自动放置字段”操作(选择一个符号并按O),可以将符号字段自动移动到合适的位置。字段自动放置功能可在原理图编辑器的“编辑选项”中进行配置,包括一个始终自动放置字段的设置。您也可以在“符号属性”或“字段属性”对话框中禁用单个字段的自动放置功能。

Symbol fields can be automatically moved to an appropriate location with the Autoplace Fields action (select a symbol and press O). Field autoplacement is configurable in the Schematic Editor’s Editing Options, including a setting to always autoplace fields. You can also disable autoplacement for individual fields in the Symbol Properties or Field Properties dialogs.

备用引脚功能

Alternate pin functions

符号引脚可以定义备用引脚功能。备用引脚功能允许您在原理图中放置符号时,为引脚选择不同的名称、电气类型和图形样式。这可用于具有多种功能的引脚,例如微控制器引脚。

Symbol pins can have alternate pin functions defined for them. Alternate pin functions allow you to select a different name, electrical type, and graphical style for a pin when a symbol has been placed in the schematic. This can be used for pins that have multiple functions, such as microcontroller pins.

在原理图中放置符号后,即可选择备用引脚功能。引脚功能在 “符号属性”对话框的“引脚功能”选项卡中选择。备用定义可在“备用分配”列的下拉列表中选择。您也可以右键单击引脚,然后从“引脚功能”菜单中选择新的功能来选择备用引脚。

Alternate pin functions are selected once a symbol has been placed in the schematic. The pin function is selected in the Pin Functions tab of the Symbol Properties dialog. Alternate definitions are selectable in the dropdown in the Alternate Assignment column. You can also select an alternate pin by right-clicking the pin and selecting a new function from the Pin Function menu.

选择备用引脚定义

如果某个引脚具有其他功能,则引脚名称旁边会显示一个小型图形指示器,如下图所示。要全局显示或隐藏这些指示器,请使用“视图”“显示引脚备用图标”

Pins that have alternate functions available are displayed with a small graphical indicator next to the pin name, as shown in the screenshot below. To globally show or hide these indicators, use ViewShow Pin Alternate Icons.

备用引脚功能指示器

有关如何向符号添加备用引脚功能的信息,请参阅符号编辑器文档

For information on how to add alternate pin functions to symbols, see the symbol editor documentation.

更新和交换符号

Updating and exchanging symbols

当向原理图添加符号时,KiCad 会将库符号的副本嵌入到原理图中,从而使原理图独立于系统库。已添加到原理图中的符号不​​会在库更改时自动更新。库符号的更改需要手动同步到原理图,以避免原理图发生意外更改。

When a symbol is added to the schematic, KiCad embeds a copy of the library symbol in the schematic so that the schematic is independent of the system libraries. Symbols that have been added to the schematic are not automatically updated when the library changes. Library symbol changes are manually synced to the schematic so that the schematic does not change unexpectedly.

您可以使用“将符号与库进行比较”工具 来检查原理图中的符号与其对应的库符号之间的差异。

要更新原理图中的符号以匹配相应的库符号,请使用“工具”“从库更新符号…”选项,或者右键单击符号并选择“更新符号…”选项。您也可以从符号属性对话框访问此工具 。

To update symbols in the schematic to match the corresponding library symbol, use ToolsUpdate Symbols from Library…​, or right click a symbol and select Update Symbol…​. You can also access the tool from the symbol properties dialog.

从库对话框更新符号

对话框顶部有选项,可以选择要更新哪些符号:

The top of the dialog has options to choose which symbols will be updated:

  • 更新原理图中的所有符号:原理图中的所有符号都将更新,以匹配库中的符号版本。

  • Update all symbols in schematic: all symbols in the schematic will be updated to match the library versions of the symbols.

  • 更新选定符号:原理图中选定的符号将被更新。

  • Update selected symbol(s): symbols that are selected in the schematic will be updated.

  • 更新与引用指示符匹配的符号:将更新与指定引用指示符匹配的符号。引用指示符字段支持通配符:*可匹配任意数量的任意字符(包括零个字符),也?可匹配任意单个字符。

  • Update symbols matching reference designator: symbols matching the specified reference designator will be updated. The reference designator field supports wildcards: * matches any number of any characters, including none, and ? matches any single character.

  • 更新与值匹配的符号:将更新具有指定值的符号。值字段支持通配符:*可匹配任意数量的任意字符(包括零个字符),也?可匹配任意单个字符。

  • Update symbols matching value: symbols with the specified value will be updated. The value field supports wildcards: * matches any number of any characters, including none, and ? matches any single character.

  • 更新与库标识符匹配的符号:将更新与指定库标识符匹配的符号。库标识符由符号库名称和符号名称组成,两者之间用句点分隔:

  • Update symbols matching library identifier: symbols that match the specified library identifier will be updated. Library identifiers consist of the symbol library name and the symbol name, separated by :.

对话框中间部分提供了一些选项,用于控制要更新符号的哪些部分。在左侧,您可以选择要修改(更新或重置)的字段。在右侧,您可以选择如何更新这些字段:

The middle of the dialog has options to control what parts of the symbol will be updated. On the left, you can select which fields will be modified (updated or reset). On the right, you can select how to update those fields:

  • 如果库符号中不存在则删除字段:如果选中此项,则将删除符号原理图版本中存在但不在库版本中的任何字段。

  • Remove fields if not in library symbol: if selected, any fields that are in the schematic version of the symbol but not the library version will be deleted.

  • 如果库符号中为空,则重置字段:如果选中此项,则库符号版本中为空的任何字段在原理图符号版本中都将设置为空。

  • Reset fields if empty in library symbol: if selected, any fields that are empty in the library version of the symbol will be set to empty in the schematic version of the symbol.

  • 更新/重置字段文本:如果选中此项,原理图版本符号中的字段内容将更新为与库版本符号中的字段内容一致。除非 选中“如果库版本符号中的字段为空则重置字段”,否则库版本符号中任何为空的字段都不会更新。

  • Update/reset field text: if selected, field contents in the schematic version of the symbol will be updated to match the fields in the library version of the symbol. Any fields that are empty in the library version of the symbol will not be updated unless Reset fields if empty in library symbol is selected.

  • 更新/重置字段可见性:如果选中,则符号原理图版本中的字段可见性将更新为与符号库版本匹配。

  • Update/reset field visibilities: if selected, fields in the schematic version of the symbol will have their visibility updated to match the library version of the symbol.

  • 更新/重置字段文本大小和样式:如果选中,则符号原理图版本中的字段的文本大小和样式将更新为与符号库版本相匹配。

  • Update/reset field text sizes and styles: if selected, fields in the schematic version of the symbol will have their text sizes and styles updated to match the library version of the symbol.

  • 更新/重置字段位置:如果选中,则将符号原理图版本中的字段移动到与符号库版本中的字段位置相匹配的位置。

  • Update/reset field positions: if selected, fields in the schematic version of the symbol will be moved to match the locations of the fields in the library version of the symbol.

  • 更新符号形状和引脚:符号的形状和引脚始终更新为与符号库版本匹配。

  • Update symbol shape and pins: the symbol’s shape and pins are always updated to match the library version of the symbol.

  • 更新关键字和封装过滤器:符号的关键字和封装过滤器始终更新以匹配符号的库版本。

  • Update keywords and footprint filters: The symbol’s keywords and footprint filters are always updated to match the library version of the symbol.

  • 更新/重置引脚名称/编号的可见性:如果选中,则原理图版本符号中引脚名称和编号的可见性将更新,以匹配库版本符号中引脚名称和编号的可见性。

  • Update/reset visibility of pin names/numbers: if selected, the visibility of pin names and numbers in the schematic version of the symbol will be updated to match the visibility of the pin names and numbers in the library version of the symbol.

  • 将备用引脚重置为默认值:如果选中此项,则为符号引脚选择的备用引脚功能将重置为默认引脚功能。

  • Reset alternate pin to default: if selected, alternate pin functions selected for the symbol’s pins will be reset to default pin functions.

  • 更新/重置符号属性:如果选中,原理图符号属性(不填充从仿真中排除从物料清单中排除从电路板中排除)将更新为与符号的库版本匹配。

  • Update/reset symbol attributes: if selected, the schematic symbol attributes (do not populate, exclude from simulation, exclude from BOM, exclude from board) will be updated to match the library version of the symbol.

  • 重置自定义电源符号:如果选中此项,原理图中的电源符号Value字段 将更新为与库中的符号版本匹配。如果未选中此项,即使其他非电源符号的字段会更新,电源符号的字段也不会更新。请注意,更改电源符号的字段会更改与该电源符号关联的全局网络。ValueValueValue

  • Reset custom power symbols: if selected, the Value field of power symbols in the schematic will be updated to match the library versions of the symbols. If not selected, the Value field of power symbols will not be updated, even if the Value field of other non-power symbols would be updated. Note that changing the Value field of power symbols will change the global net associated with the power symbol.

对话框底部显示描述已执行的更新操作的消息,并提供筛选器以显示消息类型(错误、警告、操作和/或信息)。

The bottom of the dialog displays messages describing the update actions that have been performed, with filters for which types of messages to display (errors, warnings, actions, and/or infos).

要将现有符号更改为其他符号,请使用“编辑”“更改符号…”选项,或者右键单击现有符号并选择 “更改符号…”选项。也可以从符号属性对话框访问此对话框 。

To change an existing symbol to a different symbol, use EditChange Symbols…​, or right click an existing symbol and select Change Symbol…​. This dialog is also accessible from the symbol properties dialog.

更改符号对话框

“更改符号”对话框的选项与“从库更新符号”对话框的选项非常相似。

The options for the Change Symbols dialog are very similar to the Update Symbols from Library dialog.

另一种将现有符号替换为新符号的方法是使用“工具”“编辑符号库链接…”。此对话框包含一个表格,其中列出了设计中的每个符号,并按当前库符号分组。通过在“新库引用”列中选择新符号,您可以将现有符号的所有实例都指向新符号。如果 使用“从新库更新符号字段”选项,则现有符号的字段内容将更新为与新符号的字段内容匹配。

Another way to swap existing symbols for new ones is to use ToolsEdit Symbol Library Links…​. This dialog contains a table of every symbol in the design, grouped by current library symbol. By choosing a new symbol in the New Library Reference column, you can make all instances of the existing symbol instead point to the new symbol. If the Update symbol fields from new library option is used, the contents of the existing symbols' fields will be updated to match the new symbols' fields.

“映射孤立符号”按钮会尝试自动将孤立符号重新映射到活动库中同名的符号。例如,如果存在一个具有当前库引用的符号mylib:symbol123,但mylib找不到该库,“映射孤立符号”按钮将尝试在任何已存在的库中查找名为该符号的符号 symbol123。仅当原理图中存在孤立符号时,此按钮才可用(请参阅 旧版原理图部分)。

The Map Orphans button attempts to automatically remap orphaned symbols to symbols with the same name in an active library. For example, if there is a symbol with the current library reference mylib:symbol123, but the mylib library cannot be found, the Map Orphans button will attempt to find a symbol named symbol123 in any of the libraries that are present. This button is only enabled if orphaned symbols are present in the schematic (see the legacy schematics section).

更改符号对话框

此对话框主要用于管理出现在多个库中的符号,以便在不同库之间切换时使用。例如,如果原理图使用的符号同时存在于全局库和项目特定库中,则可以使用“符号库引用”对话框在全局符号和等效的项目特定符号之间切换。它不具备对字段更新方式进行精细控制的功能;如需进行此类控制,请使用“更改符号”对话框。

This dialog is primarily useful for managing symbols that appear in multiple libraries, when you want to switch from one library to another. For example, if a schematic uses symbols that are in both a global library and a project-specific library, the Symbol Library References dialog could be used to switch between using the global symbols or the equivalent project-specific symbols. It does not have features for fine-grained control of how fields are updated; for that, use the Change Symbols dialog.

比较原理图和库中的符号

Comparing symbols between schematic and library

当原理图中的符号与原始符号库中的对应符号不一致时,可以使用“比较符号与库”工具来检查两个版本符号之间的差异。运行该工具的方法是:检查比较符号与库

When a symbol in a schematic diverges from the corresponding symbol in the original symbol library, you can use the Compare Symbol with Library tool to inspect the differences between the two versions of the symbol. Run the tool using InspectCompare Symbol With Library.

将符号与库摘要选项卡进行比较

摘要选项卡显示符号的名称,包括其库和原理图参考标识符,并列出符号的原理图版本和库版本之间的差异。

The Summary tab shows the name of the symbol, including its library and schematic reference designator, and provides a list of the differences between the schematic and library versions of the symbol.

将符号与库可视化选项卡进行比较

“可视化”选项卡以可视化的方式对比了原理图版本和库版本中的符号。它可以作为可视化差异比较工具使用。

The Visual tab shows a visual comparison of the schematic and library versions of the symbol. This can be used as a visual diff tool.

默认情况下,比较视图会将符号的两个版本叠加显示。为了更清晰地查看变化,您可以拖动选项卡底部的滑块,向右突出显示叠加视图中的库版本符号(使原理图版本符号更加透明),或向左突出显示原理图版本符号(使库版本符号更加透明)。滑块拖动到最右侧和最左侧时,原理图版本符号和库版本符号分别完全隐藏。来回拖动滑块有助于更清晰地查看变化。

By default, the comparison displays both versions of the symbol superimposed on each other. To see the changes more easily, you can drag the slider at the bottom of the tab to the right to emphasize the library version of the symbol in the superimposed view (making the schematic version of the symbol more transparent) or drag it to the left to emphasize the schematic version (making the library version more transparent). At the far right and left ends of the slider, the schematic and library versions of the symbol, respectively, are fully hidden. It may be helpful to drag the slider back and forth to see the changes more clearly.

您可以按下A/B按钮或使用/热键,快速在原理图版本和库版本之间切换。

You can press the A/B button, or use the / hotkey, to quickly toggle back and forth between the schematic and library versions.

上面的截图显示了符号与原理图版本的视觉对比(已弱化处理)。可以看到,原理图中部分透明的引脚 5 与库符号中完全不透明的引脚 5 位置不同。这表明该引脚在原理图或库符号中的位置发生了变化。

The screenshot above shows a visual comparison with the schematic version of the symbol deemphasized. You can see a partially transparent pin 5 (from the schematic version of the symbol) is in a different location than the fully opaque pin 5 (from the library symbol). This indicates that the pin was moved in either the schematic or library version of the symbol.

符号字段表

Symbol Fields Table

符号字段表允许您在电子表格界面中查看和修改所有符号的字段值。您可以使用按钮打开符号字段表符号字段表图标

The Symbol Fields Table allows you to view and modify field values for all symbols in a spreadsheet interface. You can open the Symbol Fields Table with the button.

符号字段表

使用方向键可以在单元格中导航,或者使用Tab/ Shift+Tab分别向右/向左和Enter向下移动。

Cells are navigated with the arrow keys, or with Tab / Shift+Tab to move right / left and Enter to move down, respectively.

Ctrl您可以通过点击并拖动来选择一系列单元格。复制 ( +C ) 或粘贴操作会将整个选定的单元格区域复制到 ( Ctrl+V ) 指定位置。从表格中复制一系列单元格对于创建物料清单 (BOM) 非常有用。有关复制和粘贴单元格的更多详细信息,请参见下文。

A range of cells can be selected by clicking and dragging. The whole range of selected cells will be copied (Ctrl+C) or pasted into (Ctrl+V) on a copy or paste action. Copying a range of cells from the table can be useful for creating a BOM. More details of copying and pasting cells are described below.

左侧窗格包含所有可用符号字段的列表,以及一些 虚拟字段,例如“数量”和“项目编号”。您可以使用“ 显示”复选框在主表中添加或删除任何符号字段(也可以通过右键单击主表标题来显示或隐藏字段)。可以使用 加号图标按钮添加新的符号字段;该名称的字段将添加到每个符号中。要重命名字段(这将更改所有符号中的字段名称),请使用铅笔图标 按钮。删除图标按钮会从所有符号中删除该字段。

The left pane contains a list of all available symbol fields, as well as some virtual fields such as Quantity and Item Number. You can add or remove any symbol field from the main table on using the Show checkboxes (fields can also be shown or hidden by right-clicking on the header of the main table). New symbol fields can be added using the button; a field with that name will be added to every symbol. To rename the field, which changes the field name in all symbols, use the button. The button deletes the field from all symbols.

每个字段都有自己的列标签,该标签显示在符号字段表和导出的物料清单 (BOM) 中对应列的顶部。每个字段的列标签显示在左侧窗格的第二列中。列标签不必与字段名称相同。要更改字段的列标签,请在左侧窗格中选择该字段所在的行,然后再次单击该行的列标签单元格进行编辑。

Each field has its own column label, which is displayed at the top of the corresponding column in the symbol fields table and in exported BOMs. The column label for each field is shown in the second column of in the left pane. A column label does not have to match the field name. To change a field’s column label, select the field’s row in the left pane, then click again in the column label cell of that row to edit it.

可以使用“分组依据”复选框,按任意符号字段对相似的符号进行分组。如果所有符号的“分组依据”字段都相同,则这些符号将被分组到表格中的同一行。单击行左侧的箭头,即可展开分组行以显示各个符号。“符号分组”复选框用于启用或禁用符号分组,“分组 刷新图标依据”按钮用于重新计算分组。

Similar symbols can optionally be grouped by any symbol field using the Group By checkboxes. Symbols are grouped into a single row in the table if all of their Group By fields are identical. The grouped row can be expanded to show the individual symbols by clicking the arrow at the left of the row. The Group Symbols checkbox enables or disables symbol grouping, and the button recalculates groupings.

预设可用于配置字段列表。预设会存储要显示的字段、用于分组的字段以及列顺序。您可以创建并保存自己的预设,也可以使用几个默认预设之一。自定义预设可以在此对话框或 “原理图设置”对话框中删除。

Presets are available to configure the list of fields. Presets store which fields are displayed, which fields are used for grouping, and the column order. You can create and save your own presets or use one of several default presets. Custom presets can be deleted in this dialog or in the Schematic Setup dialog.

您可以使用顶部的“筛选”文本框按参考标识符筛选符号。筛选器支持通配符:*可匹配任意数量的任意字符(包括零个字符),也?可匹配任意单个字符。您还可以更改显示范围,仅显示当前图纸中的符号、当前图纸及其所有子图纸中的符号,或显示整个项目中的符号。选中“排除 DNP”复选框,即可选择性地排除设置了 DNP(不填充)属性的符号。

Symbols can be filtered by reference designator using the Filter textbox at the top. The filter supports wildcards: * matches any number of any characters, including none, and ? matches any single character. You can also change the display scope, showing only symbols in the current sheet, the current sheet and all of its subsheets, or the entire project. Symbols with the DNP (do not populate) attribute set can be optionally excluded by checking the Exclude DNP box.

您可以在此对话框中通过选择表格中的一行来进行交叉探测。根据对话框底部的“交叉探测操作”设置,此操作可以高亮显示原理图中的相应符号、选中原理图中的相应符号,或者不执行任何操作。根据 PCB 编辑器交叉探测设置,选择操作还可以选中电路板编辑器中符号的封装。

You can cross-probe from this dialog by selecting a row in the table. Depending on the Cross-probe action setting at the bottom of the dialog, this can highlight the corresponding symbol in the schematic, select the corresponding symbol in the schematic, or do nothing. The selection action can also select the symbol’s footprint in the board editor, depending on the PCB Editor cross-probing settings.

符号字段表也是一个物料清单工具。您可以使用 “导出”按钮将符号字段保存到外部文件。导出到物料清单的字段将与当前在电子表格视图中的显示完全一致。文件格式设置在“导出”选项卡中配置。有关导出物料清单的更多信息,请参阅物料清单工具文档

The Symbol Fields Table is also a bill of materials tool. You can use the Export button to save the symbol fields to an external file. The fields are exported to the BOM exactly as they are currently shown in the spreadsheet view. File format settings are configured in the Export tab. For more information about exporting a BOM, see the BOM tool documentation.

虚拟场

如果在“符号字段表”中创建一个以 文本变量开头的字段,则会创建一个虚拟字段。虚拟字段的值会根据字段名称的内容针对每个符号进行计算。例如,名为 `<symbol_name>` 的虚拟字段${SYMBOL_NAME}对于每个符号的值都将等于该符号的名称。虚拟字段可以包含任何文本,只要它以文本变量开头即可,因此名为 `<symbol_name>` 的虚拟字段 对于每个符号的${SYMBOL_LIBRARY}:${SYMBOL_NAME}值都将为 `<symbol_name> `。<library name>:<symbol name>

If you create a field in the Symbol Fields Table whose name begins with a text variable, a virtual field will be created. Virtual fields have a value that is evaluated for each symbol based on the contents of the field name. For example, a virtual field named ${SYMBOL_NAME} will evaluate to the symbol’s name for each symbol. A virtual field can contain any text, as long as it starts with a text variable, so a virtual field named ${SYMBOL_LIBRARY}:${SYMBOL_NAME} will evaluate to <library name>:<symbol name> for each symbol.

虚拟字段仅存在于符号字段表和物料清单导出文件中。虽然它们在对话框和物料清单中显示为一列,并且可以像常规字段一样用于在物料清单导出文件中对符号进行分组或排序,但在符号字段表中添加虚拟字段并不会为原理图中的每个符号添加相应的字段。

Virtual fields exist only in the Symbol Fields Table and in BOM exports. While they are displayed as a column in the dialog and BOMs, and they can be used to group or sort symbols in BOM exports just like regular fields, adding a virtual field in the Symbol Fields Table does not add a corresponding field to each symbol in the schematic.

虚拟字段中可以使用任何文本变量,包括工作表和项目文本变量。

Any text variable can be used in virtual fields, including sheet and project text variables.

${DNP}与符号属性(例如, ` ${EXCLUDE_FROM_BOARD}<a>`、`<b> `、`<c>`、`<d> ${EXCLUDE_FROM_SIM}` )对应的文本变量${EXCLUDE_FROM_BOM}会以特殊方式显示。在“符号字段表”中,它们以复选框的形式显示,每个符号对应一个复选框,用于直接设置或取消设置相应的符号属性。在 BOM 导出中,如果属性已设置,则这些文本变量会展开为属性的友好名称(例如,` <a>`Excluded from board用于 设置属性, ${EXCLUDE_FROM_BOARD}`<b> ` 用于DNP取消设置${DNP}属性);如果属性未设置,则展开为空字符串。

Text variables that correspond to symbol attributes (${DNP}, ${EXCLUDE_FROM_BOARD}, ${EXCLUDE_FROM_SIM}, ${EXCLUDE_FROM_BOM}) are displayed specially. In the Symbol Fields Table, they are shown as checkboxes for each symbol that directly set or unset the corresponding symbol attribute. In BOM exports, they expand to the friendly name of the attribute if the attribute is set (e.g. Excluded from board for ${EXCLUDE_FROM_BOARD} and DNP for ${DNP}) or to an empty string if the attribute is not set.

最后,还可以创建两种特殊的虚拟字段:

Finally, there are two special virtual fields that can be created:

  • ${QUANTITY}是一个虚拟字段,其中包含每个符号的分组实例的数量。

  • ${QUANTITY} is a virtual field that contains the number of grouped instances of each symbol.

  • ${ITEM_NUMBER}是一个虚拟字段,其中包含表中每个符号的行号。

  • ${ITEM_NUMBER} is a virtual field that contains the row number of each symbol in the table.

简化字段填写的小技巧

电子表格中提供了几种特殊的复制/粘贴方法,可以将数值粘贴到更大的区域,包括自动递增粘贴单元格。当粘贴多个股票代码共享的数值时,这些功能非常有用。

There are several special copy/paste methods in the spreadsheet for pasting values into larger regions, including auto-incrementing pasted cells. These features may be useful when pasting values that are shared in several symbols.

下面对这些方法进行了阐述。

These methods are illustrated below.

1. 复制(Ctrl+C 2. 选择目标细胞 3. 粘贴(Ctrl+V

1份

1个选择

1糊

2份

2选择

2粘贴

3份

3选择

3糊

4份

4个选择

4糊

5份

5个选择

5糊

这些技术也适用于带有网格控件元素的其他对话框。

参考指示符和符号注释

Reference Designators and Symbol Annotation

参考标识符是设计中元件的唯一标识符。它们通常印在PCB上和装配图中,使您可以将原理图中的符号与电路板上的相应元件进行匹配。

Reference designators are unique identifiers for components in a design. They are often printed on a PCB and in assembly diagrams, and allow you to match symbols in a schematic to the corresponding components on a board.

在 KiCad 中,元件参考标识符由一个字母和一个数字组成,字母表示元件类型(例如,R电阻器用 1,C电容用 2,U集成电路用 3 等),数字表示元件类型。如果元件符号有多个单位,则参考标识符末尾还会有一个字母表示单位。没有设置参考标识符的元件符号会用一个?字符代替数字。参考标识符必须是唯一的。

In KiCad, reference designators consist of a letter indicating the type of component (R for resistor, C for capacitor, U for IC, etc.) followed by a number. If the symbol has multiple units then the reference designator will also have a trailing letter indicating the unit. Symbols that don’t have a reference designator set have a ? character instead of the number. Reference designators must be unique.

在原理图中添加符号时,可以自动设置参考标识符;您也可以通过手动编辑单个符号的参考标识符字段或使用注释工具批量设置或重置参考标识符。

Reference designators can be automatically set when symbols are added to the schematic, and you can set or reset reference designators yourself by manually editing an individual symbol’s reference designator field or in bulk using the Annotation tool.

设置符号的参考指示符的过程称为 注解

自动注释

Auto-annotation

启用自动注释后,添加到原理图中的符号将自动添加注释。您可以 在“原理图编辑器”“注释选项”面板的“首选项”中选中“自动注释符号”复选框来启用自动注释。您也可以使用左侧工具栏中的按钮切换自动注释的启用/禁用状态。自动注释图标

When auto-annotation is enabled, symbols will be automatically annotated when they are added to the schematic. You can enable auto-annotation by checking the Automatically annotate symbols checkbox in the Schematic EditorAnnotation Options pane in Preferences. Auto-annotation can also be toggled using the button in the left toolbar.

alt=

当同时添加多个符号时,它们会根据“顺序”设置进行注释,按 X 或 Y 位置排序。

When multiple symbols are added simultaneously, they are annotated according to the Order setting, sorted by either X or Y position.

编号”选项用于设置新参考编号的起始编号。该编号可以是可用的最小编号,也可以是基于图纸编号的编号。

The Numbering option sets the starting number for new reference designators. This can be the lowest available number, or a number based on the sheet number.

有关标注选项的更多信息,请参阅标注工具的文档 。

For more information about annotation options, see the documentation for the Annotation tool.

注释工具

Annotation tool

注释工具会自动为原理图中的符号分配参考标识符。要启动注释工具,请单击 注释图标顶部工具栏中的按钮。

The Annotation tool automatically assigns reference designators to symbols in the schematic. To launch the Annotation tool, click the button in the top toolbar.

注释对话

该工具提供了多种选项来控制符号的注释方式。

The tool provides several options to control how symbols are annotated.

范围:选择注释是应用于整个原理图、仅应用于当前图纸,还是仅应用于选定的符号。如果 选中“递归到子图纸”选项,则会对所选范围内的子图纸中的符号重新添加注释;否则,子图纸中的符号将不会被重新添加注释。例如,如果选中“递归到子图纸”“仅选择” ,则会对任何选定子图纸中的符号重新添加注释。

Scope: Selects whether annotation is applied to the entire schematic, to only the current sheet, or to only the selected symbols. If the Recurse into subsheets option is selected, symbols in subsheets of the selected scope will be reannotated; otherwise symbols in subsheets will not be reannotated. For example, if Recurse into subsheets and Selection only selected, symbols in any selected subsheets will be reannotated.

选项:选择注释是否应应用于所有符号并重置现有参考指示符,或者仅应用于未注释的符号。

Options: Selects whether annotation should apply to all symbols and reset existing reference designators, or apply only to unannotated symbols.

顺序: 选择编号方向。如果符号按 X 轴位置排序,则原理图左侧的所有符号编号都小于右侧的符号编号。如果符号按 Y 轴位置排序,则原理图顶部的所有符号编号都小于底部的符号编号。

Order: Chooses the direction of numbering. If symbols are sorted by X position, all symbols on the left side of a schematic sheet will be lower numbered than symbols on the right side of the sheet. If symbols are sorted by Y position, all symbols on the top of a sheet will be lower numbered than symbols at the bottom of the sheet.

编号:选择参考标识符编号的起始点。每个参考标识符都选取起始点以上未使用的最小数字。起始点可以是任意数字(通常为零),也可以是图纸编号乘以 100 或 1000,以便每个元件的参考标识符与其所在的原理图页相对应。

Numbering: Selects the starting point for numbering reference designators. The lowest unused number above the starting point is picked for each reference designator. The starting point can be an arbitrary number (typically zero), or it can be the sheet number multiplied by 100 or 1000 so that each part’s reference designator corresponds to the schematic page it is on.

清除注释按钮会清除所选范围内的所有参考标识符。

The Clear Annotation button clears all reference designators in the selected scope.

可以使用底部的复选框筛选注释消息,或使用“保存…”按钮将注释消息保存到报告中。

Annotation messages can be filtered with the checkboxes at the bottom or saved to a report using the Save…​ button.

电气连接

Electrical Connections

连接主要有两种方式:导线和标签。导线直接连接,而标签则连接到名称相同的其他标签。下图展示了导线和标签两种连接方式。

There are two primary ways to establish connections: wires and labels. Wires make direct connections, while labels connect to other labels with the same name. Both wires and labels are shown in the schematic below.

电线标签

也可以通过总线和隐藏电源引脚进行隐式连接。

Connections can also be made with buses and with implicit connections via hidden power pins.

本节还将讨论可以通过右侧工具栏上的“电源符号”按钮添加的两种特殊类型的符号:

This section will also discuss two special types of symbols that can be added with the "Power symbol" button on the right toolbar:

  • 电源符号:用于将电线连接到电源或接地网络的符号。

  • Power symbols: symbols for connecting wires to a power or ground net.

  • PWR_FLAG:一个特定的符号,用于指示当网络未连接到电源输出引脚时(例如,由板外连接器供电的电源网络)该网络已通电。

  • PWR_FLAG: a specific symbol for indicating that a net is powered when it is not connected to a power output pin (for example, a power net that is supplied by an off-board connector).

电线

Wires

导线用于直接在两点之间建立电气连接。要建立连接,一段导线的末端必须与另一段导线或引脚连接。只有导线的末端才能形成连接;如果一根导线穿过另一根导线的中间,则无法建立连接。

Wires are used to directly establish electrical connections between two points. To establish a connection, a segment of wire must be connected by its end to another segment or to a pin. Only wire ends create connections; if a wire crosses the middle of another wire, a connection will not be made.

未连接的导线末端会显示一个小方块,指示连接点。连接导线末端后,方块会消失。未连接的引脚会显示一个圆圈,连接后圆圈也会消失。

Unconnected wire ends have a small square that indicates the connection point. The square disappears when a connection is made to the wire end. Unconnected pins have a circle, which also disappears when a connection is made.

只有当导线的末端完全重合时,导线才能与其他导线或引脚连接。因此,保持符号引脚和导线与网格对齐至关重要。建议在放置符号和绘制导线时始终使用 50 mil 网格,因为 KiCad 标准符号库以及所有遵循其风格的库也都使用 50 mil 网格。
选中未与网格对齐的符号、线段和其他元素,右键单击,然后选择 “将元素对齐到网格”,即可将其恢复到网格上。
绘制和编辑线框图

线条工具图标要开始用导线连接元件,请使用右侧工具栏中的“导线”工具 ( w)。也可以通过单击未连接的符号引脚或导线末端来自动创建导线。

To begin connecting elements with wire, use the Wire tool in the right toolbar (w). Wires can also be automatically started by clicking on an unconnected symbol pin or wire end.

90度线图标您可以使用左侧工具栏中的按钮 将导线角度限制为 90 度 ,或使用45度线图标按钮将其限制为 45 度。该 按钮允许您以任意角度放置导线。您可以使用“+”自由角度线图标号切换这些模式 ,或在“首选项”“原理图编辑器”“编辑选项”中选择所需的模式。这些模式除了影响导线外,还会影响 图形线条。ShiftSpace

You can restrict wires to 90 degree angles using the button in the left toolbar, or to 45 degree angles with the button. The button allows you to place wires at any angle. You can cycle through these modes using Shift+Space, or select the desired mode in PreferencesSchematic EditorEditing Options. These modes affect graphic lines in addition to wires.

与 PCB 编辑器一样/热键可以切换导线姿态。

As in the PCB editor, the / hotkey switches wire posture.

可以使用移动 ( M) 或拖动 ( G) 工具来移动和编辑导线。与符号一样,移动工具只会移动选定的线段,而不会保持与其他线段的现有连接。拖动工具则会保持现有连接。

Wires can be moved and edited using the Move (M) or Drag (G) tools. As with symbols, the Move tool moves only the selected segment, without maintaining existing connections to other segments. The Drag tool maintains existing connections.

您可以使用“选择连接”工具(Alt+4)选择连接的导线。此工具会选择所有连接的导线段,直到到达连接点,从选定的线段或光标下的线段开始。再次使用此工具会将现有选择扩展到下一个连接点。

You can select connected wires using the Select Connection tool (Alt+4). This tool selects all connected wire segments until it reaches a junction, starting with the selected segment or the segment under the cursor. Using the tool again expands the existing selection to the next junction.

您可以通过右键单击导线并选择“切片”将导线段分成两段。导线段将在鼠标当前位置断开。您还可以通过右键单击导线段并选择“断开”将其与相邻导线段分开。

You can break a wire segment into two pieces by right-clicking a wire and selecting Slice. The segment will be separated at the current mouse position. You can also separate a wire segment from the adjacent segments by right-clicking the segment and selecting Break.

通常情况下,导线的线型遵循网络的网络类别设置Default如果未指定其他网络类别,则网络默认属于该网络类别)。但是,可以在导线的属性对话框中(E选中导线段后)覆盖所选导线段的线型。可以设置导线的宽度、颜色和线型(实线、虚线、点线等)。将宽度设置为默认值0、清除颜色以及使用Default默认线型,分别会使用网络类别设置中的默认宽度、颜色和线型。如果选中了导线连接点,也可以在此处编辑连接点的大小。

Normally the line style of a wire follows the net’s net class settings (nets are in the Default net class if no other net class is specified). However, the line style for the selected wire segments can be overridden in the wire’s properties dialog (E when a wire segment is selected). The wire’s width, color, and line style (solid, dashed, dotted, etc.) can be set. Setting the width to 0, clearing the color, and using the Default line style uses the default width, color, and style, respectively, from the net class settings. If a wire junction is included in the selection, the junction size can also be edited here.

电线和总线属性对话框
电线接头

交叉的导线并非默认连接。如果需要连接,必须显式添加连接点(添加交汇点图标右侧工具栏中的按钮)。如果导线的起点或终点位于现有导线之上,则会自动添加连接点。

Wires that cross are not implicitly connected. It is necessary to join them by explicitly adding a junction dot if a connection is desired ( button in the right toolbar). Junction dots will be automatically added to wires that start or end on top of an existing wire.

上图中的原理图使用了连接点,连接点位于连接到 P1引脚 18、19、20、21、22 和 23 的导线上。

Junction dots are used in the schematic figure above on the wires connected to P1 pins 18, 19, 20, 21, 22, and 23.

连接点的大小会自动跟随原​​理图设置常规格式中的“连接点大小” 设置。颜色跟随网络类别设置。每个连接点的属性中都可以覆盖自动设置的大小和颜色;设置大小为 0 时,其大小 与原理图的默认大小相同;清除颜色后,将使用网络类别的颜色。0

Junction size automatically follows the schematic’s Junction dot size setting in Schematic SetupGeneralFormatting. Color follows the net class setting. The automatic size and color can be overridden in each junction dot’s properties; a size of 0 is equivalent to the schematic default size, and clearing the color uses the net class color.

连接点属性对话框

标签

Labels

标签用于为导线和引脚分配网络名称。具有相同网络名称的导线被视为已连接,因此可以使用标签来建立连接,而无需绘制直接的导线连接线。

Labels are used to assign net names to wires and pins. Wires with the same net name are considered to be connected, so labels can be used to make connections without drawing direct wire connections.

一个网络只能有一个名称。如果同一个网络使用了两个不同的名称,则会违反 ERC 规则。网络列表中只会使用其中一个网络名称。最终的网络名称根据 以下规则确定。

A net can only have one name. If two different labels are placed on the same net, an ERC violation will be generated. Only one of the net names will be used in the netlist. The final net name is determined according to the rules described below.

标签有三种类型,每种类型的连接范围都不同。

There are three types of labels, each with a different connection scope.

  • 本地标签(也简称标签)仅用于连接同一工作表内的元素。使用 本地标签图标右侧工具栏中的按钮添加本地标签。

  • Local labels, also referred to simply as labels, only make connections within a sheet. Add a local label with the button in the right toolbar.

  • 全局标签全球标签图标允许在原理图中任意位置建立连接,不受图纸限制。使用右侧工具栏中的按钮添加全局标签 。

  • Global labels make connections anywhere in a schematic, regardless of sheet. Add a global label with the button in the right toolbar.

  • 层级标签连接到层级图纸引脚,用于在 层级原理图中将子图纸连接到其父图纸。使用 层级标签图标 右侧工具栏中的按钮添加层级标签。

  • Hierarchical labels connect to hierarchical sheet pins and are used in hierarchical schematics for connecting child sheets to their parent sheet. Add a hierarchical label with the button in the right toolbar.

同一张图纸上,名称相同的标签会连接在一起,无论标签类型如何。
您可以使用“更改为”工具 将一种标签类型转换为另一种标签类型 。
添加和编辑标签

使用相应的按钮或热键创建标签后,将显示“标签属性”对话框。

After using the appropriate button or hotkey to create a label, the Label Properties dialog appears.

全局标签属性对话框

“标签”字段用于设置标签文本,该文本决定了标签与其所连接的导线关联的网络。您可以点击标签名称字段旁边的下拉菜单,从原理图中已有的网络列表中选择标签名称。

The Label field sets the label’s text, which determines the net that the label assigns to its attached wire. You can choose a label name from a list of nets that are already in the schematic by clicking the dropdown menu next to the label name field.

标签文本支持上标、下标等标记,以及变量替换。使用对话框中的“语法帮助”链接可查看摘要。

Label text supports markup for overbars, subscripts, etc., as well as variable substitution. Use the Syntax help link in the dialog for a summary.

启用“多标签输入”选项后, “标签”字段支持输入多个标签,每行一个标签。在这种情况下,对话框将按顺序创建多个独立的标签,每行一个。

When the Multiple label input option is enabled, the Label field supports entering multiple labels, with one label on each line. In this case, the dialog will create multiple independent labels in sequence, one per line.

多个标签输入功能对于从其他来源(例如电子表格)复制标签非常有用。

有多种选项可以控制标签的外观。您可以更改 文本的 字体、大小和颜色,还可以设置粗体和斜体。您还可以设置文本相对于标签连接点的方向。层级标签和全局标签还有一些额外的选项: “自动”选项会根据连接的原理图元件自动设置标签方向,“形状”选项控制标签轮廓的形状(输入输出双向三态被动)。轮廓形状纯粹是视觉上的,不影响电路的实际电气性能。

There are several options to control the label’s appearance. You can change the font, size, and color of the text, and set bold and italic emphasis. You can also set the orientation of the text relative to the label’s connection point. Hierarchical and global labels have several additional options: the Auto option automatically sets the label orientation based on the connected schematic elements, and Shape option controls the shape of the label outline (Input, Output, Bidirectional, Tri-state, or Passive). The outline shape is purely visual and has no electrical consequence.

可以在“原理图设置” 中设置原理图的默认文本大小 ,可以在“首选项”中设置默认字体。
全局标签在“原理图设置”对话框 中具有额外的设置,可以控制标签文本周围的边距。

标签还可以添加字段。其中两个字段具有特殊含义(Net Class如下Sheet References所述),但也可以添加任意字段。标签字段的行为类似于符号字段:您可以显示或隐藏其名称和值,并调整其对齐方式、方向、位置、大小、字体、颜色和强调程度。

Labels can also have fields added to them. Two fields have special meaning (Net Class and Sheet References, described below), but arbitrary fields can also be added. Label fields behave like symbol fields: you can show or hide their name and value and adjust the alignment, orientation, position, size, font, color, and emphasis.

可以通过右键单击标签字段表的标题行并启用或禁用所需的列来显示或隐藏标签字段的格式选项。默认情况下并非所有列都显示。

与符号字段一样,标签字段也可以通过从原理图中打开特定标签字段的属性来单独编辑(双击标签字段,或使用E)。

Like symbol fields, label fields can be edited individually by opening the properties of a specific label field from the schematic (double click the label field, or use E).

确认标签属性后,标签将附加到光标位置以供放置。标签的连接点是标签角落的小方块。当标签连接到导线或引脚末端时,该方块会消失。如果在对话框中指定了多个标签,则在放置前一个标签后,每个标签都会附加到光标位置以供放置。

After accepting the label properties, the label is attached to the cursor for placement. The connection point for a label is the small square in the corner of the label. The square disappears when the label is connected to a wire or the end of a pin. If multiple labels were specified in the dialog, each label is attached to the cursor for placement after the previous label is placed.

未连接标签

可以通过在标签属性中选择不同的标签方向,或者通过镜像/旋转标签来改变连接点相对于标签文本的位置。

The connection point’s position relative to the label text can be changed by choosing a different label orientation in the label’s properties, or by mirroring/rotating the label.

可以通过以下方式随时访问“标签属性”对话框:选择标签并使用热键E、双击标签,或者 在右键菜单中选择“属性…” 。

The Label Properties dialog can be accessed at any time by selecting a label and using the E hotkey, double-clicking on the label, or with Properties…​ in the right-click context menu.

为网络类别分配标签

除了分配网络名称外,标签还可以用于分配网络类别。名为“网络类别”的标签字段Net Class会将指定的网络类别分配给与该标签关联的网络。为了方便地分配网络类别, Net Class默认标签字段的名称为“网络类别”,并且该字段会显示一个下拉列表,其中包含在原理图设置电路板设置Net Class中指定的所有网络类别 。

In addition to assigning net names, labels can be used to assign net classes. A label field named Net Class assigns the specified net class to the net associated with the label. To make it easier to assign net classes in this way, Net Class is the default name for new label fields, and Net Class fields present a dropdown list of all the net classes that have been specified in Schematic Setup or Board Setup.

您还可以输入原理图/电路板设置优先级列表中未明确列出的网络类。此类隐式网络类无法分配任何设计设置,例如网络类颜色或走线宽度,但仍可用于 DRC 规则查询。

You can also type in a net class that isn’t explicitly listed in the Schematic/Board Setup priority list. Such implicit net classes can’t be assigned any design settings, like net class color or track width, but they can still be used in DRC rule queries.

如果Net Class向标签添加多个字段,或者将多个带有Net Class字段的标签应用于网络,则所有指定的网络类都会分配给该网络。

If multiple Net Class fields are added to a label, or multiple labels with Net Class fields are applied to a net, all of the specified net classes are assigned to the net.

有关分配网络类的更多信息,请参阅 网络类文档

For more information about assigning net classes, see the net class documentation.

页面间引用

全局标签可以显示跨页参考,即原理图中其他出现相同全局标签位置的页码列表。单击跨页参考即可跳转到列表中的页面。如果列出了多个参考,单击参考列表会弹出菜单,供您选择所需的页面。

Global labels can display inter-sheet references, which are a list of page numbers for other places in the schematic where the same global label appears. Clicking an inter-sheet reference travels to the listed page. If multiple references are listed, clicking the reference list brings up a menu to select the desired page.

原理图设置窗口的“格式设置”页面中可全局控制跨图引用 。可以启用或禁用引用,并可调整列表的显示格式,包括添加可选的前缀或后缀字符。

Inter-sheet references are globally controlled in the Schematic Setup window’s Formatting page. References can be enabled or disabled, and the displayed format for the list can be adjusted, including with optional prefix or suffix characters.

下图显示了一个全局标签,其中包含指向另外两个原理图页面的跨页引用。前缀和后缀[分别]在原理图设置中添加。

The image below shows a global label with inter-sheet references to two other schematic pages. A prefix and suffix of [ and ], respectively, were added in Schematic Setup.

带有页间引用的全局标签

系统会自动向全局标签添加一个Sheet References带值的字段${INTERSHEET_REFS},用于控制该标签的跨图引用的显示。该${INTERSHEET_REFS}文本变量会展开为全局标签的完整跨图引用列表,具体配置信息请参见“原理图设置”。跨图引用的可见性在“原理图设置”中进行全局控制,而非通过Sheet References字段可见性控制。该Sheet References字段对其他类型的标签没有意​​义。

A Sheet References field with value ${INTERSHEET_REFS} is automatically added to global labels, and is used to control the appearance of inter-sheet references for that label. The ${INTERSHEET_REFS} text variable gets expanded to the full list of inter-sheet references for the global label, as configured in Schematic Setup. Visibility of inter-sheet references is globally controlled in Schematic Setup rather than with the Sheet References field visibility control. The Sheet References field has no meaning for other types of labels.

公交车

Buses

总线是一种在原理图中将相关信号分组以简化复杂设计的手段。总线可以使用总线工具像绘制导线一样绘制总线工具图标,并像信号导线一样使用标签命名。

Buses are a way to group related signals in the schematic in order to simplify complicated designs. Buses can be drawn like wires using the bus tool , and are named using labels the same way signal wires are.

在下图所示的示意图中,许多引脚连接到总线,总线是中间的粗蓝线。

In the following schematic, many pins are connected to buses, which are the thick blue lines in the center.

带总线的示例原理图
巴士乘客

KiCad 6.0 及更高版本中有两种类型的总线:矢量总线和群组总线。

There are two types of bus in KiCad 6.0 and later: vector buses and group buses.

向量总线是一组以公共前缀开头并以数字结尾的信号。向量总线的命名方式为:`<sup>n</sup>`,<PREFIX>[M..N]其中 `<sup>n</sup>`PREFIX是任何有效的信号名称,` M<sup>n</sup>` 是第一个后缀数字,`<sup>n N </sup>` 是最后一个后缀数字。例如,总线 `<sup>n</sup>`DATA[0..7]包含信号 `<sup>n</sup>` DATA0DATA1`<sup>n</sup>` 等,直到 ` <sup>n</sup>`。`<sup>n</sup> ` 和`<sup>n</sup>` 的指定DATA7顺序无关紧要,但两者都必须是非负数。MN

A vector bus is a collection of signals that start with a common prefix and end with a number. Vector buses are named <PREFIX>[M..N] where PREFIX is any valid signal name, M is the first suffix number, and N is the last suffix number. For example, the bus DATA[0..7] contains the signals DATA0, DATA1, and so on up to DATA7. It doesn’t matter which order M and N are specified in, but both must be non-negative.

总线是一个或多个信号和/或矢量总线的集合。即使名称不同,组总线也可以将相关的信号捆绑在一起。组总线使用特殊的标签语法:

A group bus is a collection of one or more signals and/or vector buses. Group buses can be used to bundle together related signals even when they have different names. Group buses use a special label syntax:

<OPTIONAL_NAME>{SIGNAL1 SIGNAL2 SIGNAL3}

<OPTIONAL_NAME>{SIGNAL1 SIGNAL2 SIGNAL3}

组成员列在花括号 ( {}) 内,成员之间用空格分隔。组的名称(可选)位于左花括号之前。如果组总线未命名,则 PCB 上的网络将直接使用组内的信号名称。如果组总线已命名,则生成的网络将以该名称作为前缀,.前缀与信号名称之间用句点 ( ) 分隔。

The members of the group are listed inside curly braces ({}) separated by space characters. An optional name for the group goes before the opening curly brace. If the group bus is unnamed, the resulting nets on the PCB will just be the signal names inside the group. If the group bus has a name, the resulting nets will have the name as a prefix, with a period (.) separating the prefix from the signal name.

例如,总线{SCL SDA}有两个信号成员,在网表中,这两个信号分别为SCLSDA。总线USB1{DP DM}将生成名为USB1.DP和 的网络USB1.DM。对于在多个类似电路中重复使用较大总线的设计,使用此技术可以节省时间。

For example, the bus {SCL SDA} has two signal members, and in the netlist these signals will be SCL and SDA. The bus USB1{DP DM} will generate nets called USB1.DP and USB1.DM. For designs with larger buses that are repeated across several similar circuits, using this technique can save time.

组总线也可以包含矢量总线。例如,总线 可以同时包含矢量总线和普通信号,并在PCB上MEMORY{A[7..0] D[7..0] OE WE}形成诸如MEMORY.A7和 之类的网络。MEMORY.OE

Group buses can also contain vector buses. For example, the bus MEMORY{A[7..0] D[7..0] OE WE} contains both vector buses and plain signals, and will result in nets such as MEMORY.A7 and MEMORY.OE on the PCB.

母线的绘制和连接方式与信号线相同,包括使用接线盒连接交叉的导线。与信号线一样,母线只能有一个名称——如果同一条母线上贴有两个冲突的标签,则会触发电气可靠性委员会 (ERC) 的违规行为。

Bus wires can be drawn and connected in the same manner as signal wires, including using junctions to create connections between crossing wires. Like signals, buses cannot have more than one name — if two conflicting labels are attached to the same bus, an ERC violation will be generated.

公交车乘客之间的联系

总线上同一成员之间的引脚必须用标签连接。引脚不能直接连接到总线上;KiCad 会忽略这种连接方式。

Pins connected between the same members of a bus must be connected by labels. It is not possible to connect a pin directly to a bus; this type of connection will be ignored by KiCad.

在上面的例子中,连接是通过贴在连接到引脚的导线上的标签来实现的。总线入口(呈45度角的导线段)仅用于图形化表示,并非形成逻辑连接的必要条件。

In the example above, connections are made by the labels placed on wires connected to the pins. Bus entries (wire segments at 45 degrees) to buses are graphical only, and are not necessary to form logical connections.

事实上,Insert如果元件引脚按升序排列(这在实际应用中,例如存储器、微处理器等元件上很常见),则可以使用重复命令()快速建立连接,方法如下:

In fact, using the repetition command (Insert), connections can be very quickly made in the following way, if component pins are aligned in increasing order (a common case in practice on components such as memories, microprocessors…​):

  • 放置第一个标签(例如PCA0

  • Place the first label (for example PCA0)

  • 根据需要多次使用重复命令来放置构件。KiCad 会自动创建下一个标签(PCA1PCA2…),并使其垂直对齐,理论上其位置应与其他引脚的位置相同。

  • Use the repetition command as much as needed to place members. KiCad will automatically create the next labels (PCA1, PCA2…​) vertically aligned, theoretically on the position of the other pins.

  • 在第一个标签下方绘制导线。然后使用重复命令将其他导线放置在标签下方。

  • Draw the wire under the first label. Then use the repetition command to place the other wires under the labels.

  • 如果需要,按相同方式放置总线条目(放置第一个条目,然后使用重复命令)。

  • If needed, place the bus entries by the same way (Place the first entry, then use the repetition command).

在“首选项”菜单的“原理图编辑器” → “编辑选项”部分,您可以设置重复参数:

In the Schematic EditorEditing Options section of the Preferences menu, you can set the repetition parameters:

  • 水平俯仰角

  • Horizontal pitch

  • 垂直俯仰角

  • Vertical pitch

  • 标签增量(标签可以增加或减少 1、2、3 等)

  • Label increment (labels can be incremented or decremented by 1, 2, 3, etc.)

公交车展开

展开工具允许您快速从总线中分离信号。要展开信号,请右键单击总线对象(例如总线导线),然后选择“ 从总线展开” 。或者,当光标悬停在总线对象上时,可以使用“展开总线”快捷键(默认快捷键:)C。菜单允许您选择要展开的总线成员。

The unfold tool allows you to quickly break out signals from a bus. To unfold a signal, right-click on a bus object (a bus wire, etc) and choose Unfold from Bus. Alternatively, use the Unfold Bus hotkey (default: C) when the cursor is over a bus object. The menu allows you to select which bus member to unfold.

选择总线成员后,单击即可将总线成员标签放置在所需位置。该工具会自动生成总线入口和连接到标签位置的导线。放置标签后,您可以继续放置其他导线段(例如,连接到元件引脚),并以任何常规方式完成导线连接。

After selecting the bus member, the next click will place the bus member label at the desired location. The tool automatically generates a bus entry and wire leading up to the label location. After placing the label, you can continue placing additional wire segments (for example, to connect to a component pin) and complete the wire in any of the normal ways.

公交车别名

总线别名是一种快捷方式,可让您更高效地处理大型总线组。它允许您定义一个总线组并为其指定一个简短的名称,然后在整个原理图中可以使用该简短名称代替完整的总线组名称。

Bus aliases are shortcuts that allow you to work with large group buses more efficiently. They allow you to define a group bus and give it a short name that can then be used instead of the full group name across the schematic.

要创建总线别名,请打开原理图设置中的 “总线别名定义”窗格。

To create bus aliases, open the Bus Alias Definitions pane in Schematic Setup.

总线别名定义

别名可以是任何有效的信号名称。您可以使用对话框向别名添加信号或矢量总线。作为快捷方式,您可以键入或粘贴以空格分隔的信号和/或总线列表,它们都将添加到别名定义中。在本例中,我们定义了一个名为 `alias` 的别名, USB其中包含成员 `a` DPDM`b` 和VBUS`c`。

An alias may be named any valid signal name. Using the dialog, you can add signals or vector buses to the alias. As a shortcut, you can type or paste in a list of signals and/or buses separated by spaces, and they will all be added to the alias definition. In this example, we define an alias called USB with members DP, DM, and VBUS.

定义别名后,可以在组总线标签中使用它,只需将别名放在组总线的花括号内{USB}即可:`< alias {DP DM VBUS}name DP= "alias" DM... VBUSUSB1{USB}USB1.DP

After defining an alias, it can be used in a group bus label by putting the alias name inside the curly braces of the group bus: {USB}. This has the same effect as labeling the bus {DP DM VBUS}: the nets will be DP, DM, and VBUS. You can also add a prefix name to the group, such as USB1{USB}, which results in nets such as USB1.DP. For complicated buses, using aliases can make the labels on your schematic much shorter. Keep in mind that the aliases are just a shortcut, and the name of the alias is not included in the netlist.

总线别名保存在创建别名时打开的原理图文件中。“总线别名定义”窗口会在别名列表底部显示与所选别名关联的原理图文件。在给定原理图图纸中创建的任何别名都可以在同一层次设计中的任何其他原理图图纸中使用。如果层次设计中的多个图纸包含名称相同的总线别名,则这些别名必须具有相同的成员。如果多个同名总线别名的成员不一致,ERC 将报告违规。

Bus aliases are saved in the schematic file that is opened when the alias is created. The Bus Alias Definitions window shows the schematic file associated with the selected alias at the bottom of the alias list. Any aliases created in a given schematic sheet are available to use in any other schematic sheet that is in the same hierarchical design. If multiple sheets in a hierarchical design contain identically-named bus aliases, the aliases must all have the same members. ERC will report a violation if multiple bus aliases with the same name do not have consistent members.

例子

在下面的示意图中,USB定义了一个名为 的总线别名,其成员DPDN

In the schematic below, a bus alias named USB is defined with members DP, DN.

根片有三个总线,一个带标签{USB},没有前缀,另外两个带前缀:USB1{USB}USB2{USB}。第一个总线产生网络DPDN,第二个总线产生网络USB1.DPUSB1.DN,第三个总线产生网络USB2.DPUSB2.DN

The root sheet has three buses, one with label {USB}, with no prefix, and two with prefixes: USB1{USB} and USB2{USB}. The first bus results in nets DP and DN, the second results in nets USB1.DP and USB1.DN, and the third results in nets USB2.DP and USB2.DN.

总线别名示例,根表

连接到子图纸时,层级标签(以及相应的层级图纸引脚)的命名语法相同。它们需要与连接的总线相同的成员。与总线标签一样,层级标签可以定义前缀,也可以不定义前缀。在这种情况下,层级标签的名称为{USB}(即不带前缀)UA{USB}UB{USB}

When connecting to a sub-sheet, the hierarchical labels (and therefore hierarchical sheet pins) are named with the same syntax. They need the same members as the connected bus. As for bus labels, hierarchical labels can define a prefix or not. In this case, the hierarchical labels are named {USB} (i.e. no prefix) and UA{USB} and UB{USB}.

在子图纸中,总线的层级标签定义了该图纸上展开的总线成员所显示标签的前缀。然而,网络会根据与父图纸的连接情况进行解析。

Within the subsheet, the hierarchical labels for the bus are what define the prefixes of displayed labels of unfolded bus members on that sheet. However, the nets resolve according to the connectivity with the parent sheet.

例如,子表中标记的总线成员由于层次标签而UB.DP具有标签前缀 ,并且由于连接到该层次标签的父表中的总线名称而具有解析的网络名称。UB/USB1.DP

For example, the bus member labeled UB.DP in the subsheet has the label prefix UB due to the hierarchical label, and the resolved net name /USB1.DP due to the name of the bus in the parent sheet that connects to that hierarchical label.

总线别名示例,子工作表
带有多个标签的公交车

KiCad 5.0 及更早版本允许将不同标签的总线连接在一起,并在生成网表时将这些总线的成员连接起来。KiCad 6.0 中移除了此功能,因为它与组总线不兼容,而且由于难以预测给定信号的名称,还会导致网表混乱。

KiCad 5.0 and earlier allowed the connection of bus wires with different labels together, and would join the members of these buses during netlisting. This behavior has been removed in KiCad 6.0 because it is incompatible with group buses, and also leads to confusing netlists because the name that a given signal will receive is not easily predicted.

如果您在最新版本的 KiCad 中打开使用此功能的设计,您将看到“迁移总线”对话框,该对话框会指导您更新原理图,以便任何给定的总线组上都只有一个标签。

If you open a design that made use of this feature in a modern version of KiCad, you will see the Migrate Buses dialog which guides you through updating the schematic so that only one label exists on any given set of bus wires.

公交车迁移对话

对于每组带有多个标签的总线导线,您必须选择要保留的标签。下拉名称框允许您在设计中已有的标签中进行选择,或者您也可以手动在新名称字段中输入不同的名称。

For each set of bus wires that has more than one label, you must choose the label to keep. The drop-down name box lets you choose between the labels that exist in the design, or you can choose a different name by manually entering it into the new name field.

权力符号

Power Symbols

电源符号是通常用于表示与电源网络连接的符号,例如VCCGND。电源符号是虚拟的:它们并不代表 PCB 上的物理元件。

Power symbols are symbols that are conventionally used to represent a connection to a power net, such as VCC or GND. Power symbols are virtual: they do not represent a physical component on the PCB.

除了作为连接网络为电源轨的视觉指示外,电源符号还用于建立全局连接:两个电源符号可以Value 在原理图中的任意位置相互连接,不受图纸限制。电源符号的Value字段决定了所连接网络的名称。

In addition to being a visual indicator that the attached net is a power rail, power symbols make global connections: two power symbols with the Value connect to each other anywhere in the schematic, regardless of sheet. The power symbol’s Value field determines the name of the attached net.

在之前的 KiCad 版本中,电源符号使用不可见的电源输入引脚,这些引脚会根据引脚名称建立隐式的全局连接,如下所述从 KiCad 8 开始,电源符号不再需要使用不可见的引脚,全局连接则基于电源符号的值建立。

在下图中,电源符号用于将电容器的正负极分别连接到VCCGND网络。

In the figure below, power symbols are used to connect the positive and negative terminals of the capacitors to the VCC and GND nets, respectively.

权力符号示例

KiCad 标准库中包含电源符号power,但也可以在任何库中创建电源符号。自定义电源符号的创建方法请参阅符号编辑器文档。除了创建新符号外,您还可以修改原理图中现有的电源符号:更改其Value字段将更改电源符号连接的网络。

In the KiCad standard library, power symbols are found in the power library, but power symbols can be created in any library. Creating custom power symbols is described in the symbol editor documentation. Instead of making a new symbol, you can also modify an existing power symbol in the schematic: changing its Value field will change the net the power symbol connects to.

网络名称分配规则

Net name assignment rules

原理图中的每个网络都被赋予一个名称,无论该名称是由用户指定还是由 KiCad 自动生成。

Every net in the schematic is assigned a name, whether that name is specified by the user or automatically generated by KiCad.

当多个标签附加到同一网络上时,最终的网络名称按以下优先级顺序确定:

When multiple labels are attached to the same net, the final net name is determined in the following order, from highest priority to lowest:

  1. 全球标签

  2. Global labels

  3. 权力符号

  4. Power symbols

  5. 本地标签

  6. Local labels

  7. 层级标签

  8. Hierarchical labels

  9. 分层片状引脚

  10. Hierarchical sheet pins

如果一张网上贴有多个相同类型的标签,则按字母顺序排列名称,并使用第一个标签。

If there are multiple labels of one type attached to a net, the names are sorted alphabetically and the first is used.

如果一张网状结构穿过 层级结构的多个层级,它将以层级结构中最高层级的名称命名,该层级必须具有层级标签或本地标签。通常情况下,本地标签的优先级高于层级标签。

If a net travels through multiple sheets of a hierarchy, it will take its name from the highest level of the hierarchy where it has a hierarchical label or local label. As usual, local labels take priority over hierarchical labels.

如果以上任何标签类型都没有连接到网络,则根据连接的符号引脚自动生成网络名称。

If none of the label types above are attached to a net, the net’s name is automatically generated based on the connected symbol pins.

PWR_FLAG

PWR_FLAG

PWR_FLAG上图中可以看到两个符号。它们向ERC表明这两个电源网络实际上VCCGND连接到电源,因为这两个网络都没有直接连接电压调节器输出等电源。

Two PWR_FLAG symbols are visible in the screenshot above. They indicate to ERC that the two power nets VCC and GND are actually connected to a power source, as there is no explicit power source such as a voltage regulator output attached to either net.

如果没有这两个标志,ERC 工具将诊断为:错误:输入电源引脚未被任何输出电源引脚驱动。

Without these two flags, the ERC tool would diagnose: Error: Input Power pin not driven by any Output Power pins.

PWR_FLAG符号可在符号库中找到power。将任意电源输出引脚连接到该网络即可达到相同效果。

The PWR_FLAG symbol is found in the power symbol library. The same effect can be achieved by connecting any power output pin to the net.

无连接标志

No-connection flag

无连接标志(无连接图标)用于指示引脚有意未连接。这些标志可以防止对有意未连接的引脚发出“未连接引脚”的 ERC 警告。此外,虽然堆叠在一起的符号引脚通常连接到同一网络,但如果为堆叠的引脚添加无连接标志,它们将连接到不同的网络。

No-connection flags () are used to indicate that a pin is intentionally unconnected. These flags prevent "unconnected pin" ERC warnings for pins that are intentionally unconnected. Also, while symbol pins that are stacked on top of each other are normally connected to the same net, if a no-connection flag is added to the stacked pins they will instead be connected to separate nets.

请注意,无连接标志与“未连接”符号引脚类型不同 ,尽管它们都能防止在相关引脚上出现“未连接引脚”ERC 警告,并防止堆叠引脚相互连接。

Note that no-connection flags are distinct from the "unconnected" symbol pin type, although they both prevent "unconnected pin" ERC warnings on the pin in question and prevent stacked pins from connecting to each other.

隐藏式电源引脚

Hidden Power Pins

当符号的电源引脚可见时,必须像连接其他信号一样进行连接。然而,有时符号会绘制隐藏的电源输入引脚,这些引脚默认是隐式连接的。KiCad 会自动将类型为“电源输入”的不可见引脚连接到与其同名的全局网络。例如,如果一个符号有一个名为 `<power_input_pin>` 的隐藏电源输入引脚VCC,则该引脚在所有图纸上都会全局连接到 `<power_input_pin>`VCC网络。这种隐式连接方式不建议在新设计中使用。

When the power pins of a symbol are visible, they must be connected, as with any other signal. However, symbols are sometimes drawn with hidden power input pins, which are connected implicitly. KiCad automatically connects invisible pins with type Power Input to a global net with the same name as the pin. For example, if a symbol has a hidden power input pin named VCC, this pin will be globally connected to the VCC net on all sheets. This kind of implicit connection is not recommended in new designs.

必须谨慎使用隐藏式电源输入引脚,因为它们可能导致意外连接。隐藏式引脚本身是不可见的,也不会显示引脚名称。这使得很容易意外地将两个电源引脚连接到同一网络上。因此,不建议在符号中使用不可见的电源引脚,仅为兼容旧版设计和符号而提供。
可以通过在“原理图编辑器”“显示选项”首选项中选中“显示隐藏引脚”选项,或者选择“视图”“显示隐藏引脚”来 显示原理图中的隐藏引脚。左侧工具栏上 也有一个切换图标。隐藏引脚 24

网络类

Net classes

网络类是网络的命名分组,可以为其分配设计规则(用于 PCB)和图形属性(用于原理图)。

Net classes are named groupings of nets that can be assigned design rules (for the PCB) and graphical properties (for the schematic).

一个网络可以分配多个网络类(通过图形分配和网络类模式的组合)。对于分配了多个网络类的网络,系统会创建一个有效的聚合网络类,该聚合网络类会继承优先级最高的、具有相应属性的网络类的所有属性。网络类的优先级由原理图或电路板设置对话框中的顺序决定。 Default在所有显式分配的网络类都被考虑之后,该聚合网络类将作为任何缺失属性的备用方案;这意味着Default即使网络已经显式分配了其他网络类,它们也可能属于该聚合网络类。

More than one net class can be assigned to a net (through a combination of graphical assignments and net class patterns). For nets with multiple net classes assigned, an effective aggregate net class is formed, taking any net class properties from the highest priority net class which has that property set. Net class priority is determined by the ordering in the Schematic or Board Setup dialogs. The Default net class is used as a fallback for any missing properties after all explicit net classes have been considered; this means that nets may be part of the Default net class even if they have other net classes explicitly assigned.

网络类可以在原理图对话框或电路板设置对话框中创建和编辑。可以使用下述基于模式的分配方法,将网络添加到原理图或电路板中的网络类。也可以使用带有网络类指令或网络标签的图形化分配方法,将网络分配到原理图中的网络类。

Net classes may be created and edited in either the Schematic or Board Setup dialogs. Nets can be added to net classes in either the schematic or board using pattern-based assignments described below. Nets can also be assigned to net classes in the schematic using graphical assignments with net class directives or net labels.

选择电线或标签后,窗口底部的消息面板中会显示该网络的网络等级。

Selecting a wire or label displays the net’s net class in the message panel at the bottom of the window.

状态窗格中显示所选导线的网络等级

在原理图设置中管理网络类

Managing net classes in Schematic Setup

网络类在原理图设置对话框的“网络类”面板中进行管理 。

Net classes are managed in the Net Classes panel of the Schematic Setup dialog.

原理图设置网络类面板

顶部窗格列出了设计中存在的网络类。Default 网络类始终存在,您可以使用按钮添加其他网络类 添加网络类图标,也可以使用按钮删除选定的网络类 删除网络类图标

The top pane lists the net classes that exist in the design. The Default net class always exists, and you can add additional net classes with the button or remove the selected net class with the button.

可以使用上下按钮按优先级顺序移动网络类 向上移动网络类图标向下移动网络类图标请注意,Default优先级最低的网络类始终是优先级最低的网络类,因此无法移动。

Net classes can be moved up and down in priority order with the and buttons. Note that the Default net class will always be the lowest priority net class and can therefore not be moved.

每个网络类都可以拥有独特的图形属性,这些属性决定了该网络类的导线在原理图中的显示方式。导线和总线的粗细、颜色以及线条样式(实线、虚线、点线等)均可调整。将颜色设置为透明将使用该网络类主题的默认导线/总线颜色,该颜色可在“首选项”中进行配置。默认情况下,为某个网络类配置的任何颜色都将用于绘制该网络类中的导线。如果在“原理图编辑器”首选项的“显示选项”部分启用了“突出显示网络类颜色”设置,则此颜色将用于在该网络类中的导线周围绘制高亮显示,而导线本身将始终使用配色方案的导线颜色绘制。

Each net class can have unique graphic properties that determine how wires of that net class are displayed in the schematic. Wire and bus thicknesses, color, and line style (solid, dashed, dotted, etc.) can all be adjusted. Setting the color to transparent will use the theme’s default wire/bus color for the net class, which is configurable in Preferences. By default any color that is configured for a net class controls the color is used to draw wires in that net class. If the Highlight netclass colors setting is enabled in the Display Options section of the Schematic Editor preferences, this color will instead be used to draw a highlight around wires in that netclass, and the wires themselves will always be drawn with the color scheme’s wire color.

您还可以为每个网络类别设置电路板设计规则,但默认情况下 DRC 字段是隐藏的。右键单击标题行可显示或隐藏其他列。有关设置网络类别设计规则的更多信息,请参阅 PCB 编辑器文档

You can also set board design rules for each net class, although the DRC fields are hidden by default. Right click the header row to show or hide additional columns. For more information about setting net class design rules, see the PCB editor documentation.

用户自定义网络类的所有网络类参数均为可选。但是,网络类的所有属性都Default必须设置。当一个网络被分配了多个网络类时,图形属性或电路板设计规则的相应值将取自优先级最高且已设置相关值的网络类。如果仅分配了一个网络类,且该网络类包含缺失的属性,则所有缺失值都将取自该Default网络类。

All net class parameters for user-defined net classes are optional. However, all properties belonging to the Default net class must be set. When a net has more than one net class assigned, the appropriate value for graphic properties or board design rules is taken from the highest priority assigned net class with the relevant value set. If only one net class is assigned which contains missing properties, any missing values will be taken from the Default net class.

底部窗格列出了基于模式的网络类别分配。每一行包含一个网络名称模式和一个网络类别;名称与该模式匹配的网络将被分配到指定的网络类别。如果一个网络匹配多个模式,则该网络将被分配到所有匹配的网络类别。您可以单击相应的列标题,按模式或网络类别名称对网络类别分配模式列表进行排序。

The bottom pane lists pattern-based net class assignments. Each row has a net name pattern and a net class; nets with names that match the pattern are assigned to the specified net class. If a net matches multiple patterns, the net is assigned to all of the matching net classes. You can sort the list of net class assignment patterns by pattern or by net class name by clicking on the corresponding column header.

基于模式的网络类别分配是动态的:当添加一个与现有模式匹配的新网络时,它将自动分配到关联的网络类别。网络模式可以使用通配符(`\n`*匹配任意数量的任意字符,包括零个字符;`\n`?匹配任意字符)和 正则表达式。与所选模式匹配的网络将显示在模式列表的右侧。

Pattern-based net class assignments are dynamic: when a new net is added that matches an existing pattern, it will be assigned to the associated net class automatically. Net patterns can use both wildcards (* to match any number of any characters, including none, and ? to match any character) and regular expressions. The nets that match the selected pattern are displayed to the right of the pattern list.

例如,该net*模式匹配名为net、、、以及任何其他以开头的网络名称。因为在正则表达式中,的含义略有不同(匹配零个或多个前面的字符),所以该net1模式也会匹配名为的网络。networknet**net*ne

For example, the net* pattern matches nets named net, net1, network, and any other net name beginning with net. Because * has a slightly different meaning in a regular expression (* matches zero or more of the preceding character), the net* pattern would also match a net named ne.

请记住,网络名称必须包含完整的图纸路径。例如,根图纸中局部标记的网络名称以句点开头/

使用该添加网络类图标按钮添加网络类分配模式,或使用该 删除网络类图标按钮删除模式。

Use the button to add a net class assignment pattern or the button to remove a pattern.

除了在“原理图设置”对话框中添加网络类别模式外,您还可以直接从原理图画布创建网络类别模式。右键单击一个网络,然后选择“分配网络类别…”以打开“添加网络类别分配” 对话框。网络类别模式会预先填充所选网络的名称,但您可以根据需要更改模式。对话框中会显示所有与该模式匹配的网络。此方法仅适用于已分配名称的网络。

Instead of adding net class patterns in the Schematic Setup dialog, you can directly create net class patterns from the schematic canvas. Right click a net and select Assign Netclass…​ to bring up the Add Netclass Assignment dialog. The net class pattern is pre-filled with the name of the selected net, but the pattern can be changed if desired. All nets matching the pattern are displayed in the dialog. This method can only be used on nets with an assigned name.

根据原理图分配网络类别

在原理图中以图形方式分配网络类别

Graphically assigning net classes in the schematic

作为基于模式的网络类别分配的替代方法,可以使用指令标签网络标签规则区域,以图形方式将网络类别分配给原理图中的网络。

As an alternative to pattern-based net class assignment, net classes can be graphically assigned to nets in the schematic using either directive labels, net labels, or rule areas.

下图中,使用指令标签将信号分配给50R 网络类。

In the image below, a directive label is used to assign signals to the 50R net class.

连接到总线的网络类指令

指令标签图标指令标签通过右侧工具栏中的按钮添加 。它们的作用类似于普通标签,但不能用于命名网络。附加的网络会根据指令Net Class字段的值被分配一个网络类。该字段会显示一个下拉列表,其中包含在原理图设置电路板设置Net Class中指定的所有网络类 。

Directive labels are added with the button in the right toolbar. They behave like labels, except that they cannot be used to name a net. The attached net is assigned a net class according to the value of the directive’s Net Class field. The Net Class field presents a dropdown list of all the net classes that have been specified in Schematic Setup or Board Setup.

您还可以输入原理图/电路板设置优先级列表中未明确列出的网络类。此类隐式网络类无法分配任何设计设置,例如网络类颜色或走线宽度,但仍可用于 DRC 规则查询。

You can also type in a net class that isn’t explicitly listed in the Schematic/Board Setup priority list. Such implicit net classes can’t be assigned any design settings, like net class color or track width, but they can still be used in DRC rule queries.

如果Net Class向指令标签添加多个字段,或者Net Class向网络应用多个带有字段的指令标签,则所有指定的网络类都会分配给该网络。

If multiple Net Class fields are added to a directive label, or multiple directive labels with Net Class fields are applied to a net, all of the specified net classes are assigned to the net.

如果将指令附加到总线上,则总线上的所有成员都将被分配到指定的网络类。

If a directive is attached to a bus, all members of the bus are assigned to the specified net class.

网络类指令窗口

除了关联的网络类之外,您还可以在指令的属性中编辑指令的形状 (点、圆、菱形或矩形)、方向引脚长度颜色。

In addition to the associated net class, you can edit the directive’s shape (dot, circle, diamond, or rectangle), orientation, pin length, and color in the directive’s properties.

Net Class也可以通过在标签中 添加字段来使用网络标签为网络分配网络类别。

规则区域工具(规则区域按钮)可用于绘制一个形状,并将网络类指令附加到该形状上。任何穿过或位于规则区域内的导线总线标签或符号引脚都将被赋予附加到规则区域边界的网络类指令的网络类。下图显示了一个示例;所有穿过规则区域的导线都将被赋予该RAM_ADDR网络类。

The Rule Area tool () can be used to draw a shape to which net class directives can be attached. Any wire, bus, label, or symbol pin which crosses or is inside the rule area will be assigned the net class of a net class directive attached to the rule area border. An example is shown in the image below; all wires passing through the rule area will be assigned the RAM_ADDR net class.

按规则区域分配网络类别

您可以使用“视图”“显示指令标签”选项在原理图中显示或隐藏指令标签。

You can show or hide directive labels in the schematic using the ViewShow Directive Labels option.

组件类

Component classes

元件类是元件的命名分组:它们被分配给原理图中的符号,并应用于电路板上相应的封装。它们用于将符号分组到多通道设计中的通道中,也可用于在自定义 DRC 规则中对封装进行分组。

Component classes are named groupings of components: they are assigned to symbols in the schematic and also apply to the corresponding footprints on the board. They are used to group symbols into channels for multichannel designs and can also be used to group footprints in custom DRC rules.

要将组件类分配给符号,您可以Component Class向符号添加一个名为“组件类”的字段。这样,该符号就成为由该字段命名的组件类的成员。

To assign a component class to a symbol, you can add a symbol field named Component Class to the symbol. The symbol will then be a member of the component class named by the field.

指令标签按钮您还可以结合使用指令标签( )和规则区域()来分配组件类规则区域按钮。规则区域工具可用于绘制形状,并将指令标签附加到该形状上。任何穿过或位于规则区域内的符号都将被分配到由附加到规则区域边界的指令标签指定的组件类。下图显示了一个示例;R1 和 R2 将被分配到Channel 1组件类。

You can also assign component classes using directive labels () in combination with rule areas (). The Rule Area tool can be used to draw a shape to which directive labels can be attached. Any symbol which crosses or is inside the rule area will be assigned to the component class specified by the directive label attached to the rule area border. An example is shown in the image below; R1 and R2 will be assigned to the Channel 1 component class.

组件类规则区域

组件可以拥有多个类,符号如果其任何子单元具有某个类,则该符号也会具有该类。如果Component Class向指令标签添加多个字段,或者将多个带有Component Class字段的指令标签应用于规则区域,则规则区域中的符号将具有所有指定的组件类。

Components can have more than one class, and symbols take on a class if any of their sub-units have that class. If multiple Component Class fields are added to a directive label, or multiple directive labels with Component Class fields are applied to a rule area, the symbols in the rule area will take on all of the specified component classes.

图形和文本

Graphics and text

为了便于记录,可以在原理图中添加文本、图形和图像。这些元素不会对原理图产生任何电气影响。

Text, graphic shapes, and images can be added to schematics for documentation purposes. These items do not have any electrical effect on the schematic.

下图显示了图形线条和文本(“通信 DSP”),以及符号和几种类型的标签。

The image below shows graphic lines and text ("COMMUNICATION DSP") in addition to symbols and several types of labels.

带注释的框架示例

文本和文本框

Text and text boxes

示意图中可以添加两种类型的文本,分别称为文本(添加文本图标)和文本框(添加文本框图标)。两者都可以通过右侧工具栏中的相应按钮添加。文本框与普通文本类似,区别在于它们可以添加可选边框,并且边框内的文本会自动重排。

Two kinds of text can be added to schematics, which are referred to as text () and text boxes (). Both are added using their respective buttons in the right toolbar. Text boxes are similar to regular text except that they have an optional border and they automatically reflow text within that border.

示意图文本和文本框示例

两种文本项都支持多行文本和基本格式设置功能,但文本框会自动换行以适应边框,并提供额外的格式选项。所有文本均可调整字体、颜色、大小、粗体和斜体、左右对齐以及垂直和水平方向。文本框还支持水平居中、垂直对齐选项以及彩色边框和填充。您还可以调整文本框中文本两侧的内边距(内边距可通过“ 属性管理器”设置,但不能通过“文本框属性”对话框设置)。

Both kinds of text item support multiline text and basic formatting features, but text boxes wrap text to fit in the outline and have additional formatting options. All text has adjustable fonts, color, size, bold and italic emphasis, left and right alignment, and vertical and horizontal orientation. Text boxes additionally support horizontal centering, vertical alignment options, and colored borders and fill. You can also adjust the padding on each side of text in a text box (padding can be set using the Properties Manager, but not using the Text Box Properties dialog).

可以在“原理图设置” 中设置原理图的默认文本大小 ,可以在“首选项”中设置默认字体。
文本框属性对话框

通过在文本属性的“链接”框中输入目标,可以将文本和文本框转换为链接。

Text and text boxes can be made into a link by entering a target in the Link box in the text properties.

根据链接目标的不同,您可以链接到不同类型的资源。链接目标可以是:

You can link to different kinds of resources depending on the link target. The link target can be:

  • 在当前原理图中,使用#页码后跟页码。

  • a sheet in the current schematic, using # followed by the page number

  • file://使用具有以下方案的 URL 访问本地计算机上的文件

  • a local file on your machine, using a URL with the file:// scheme

  • http://一个网站,使用带有orhttps://方案的URL。

  • a website, using a URL with the http:// or https:// scheme

  • 另一个资源,使用具有适当方案的 URL,例如ftp://

  • another resource, using a URL with the appropriate scheme, e.g. ftp://

如果没有使用协议前缀,则假定目标是本地文件,就像file://使用了该方案一样。

If no protocol prefix is used, the target is assumed to be a local file as if the file:// scheme was used.

您可以使用链接目标框中的下拉菜单自动填充表格、文件和网页链接。其他类型的链接无法自动填充,但如果您的系统支持,它们也能正常工作。

Sheet, file, and web links can be autofilled using the dropdown meu in the link target box. Other kinds of links cannot be autofilled but will work if your system can handle them.

字体

文本和文本框支持自定义字体,您可以在文本属性对话框的“字体”下拉菜单中选择字体。除了 KiCad 字体外,您还可以使用计算机上安装的任何 TTF 字体。

Text and text boxes support custom fonts, which are selectable with the Font dropdown in the properties dialog for the text. In addition to the KiCad font, you can use any TTF font installed on your computer.

用户自定义字体未嵌入到项目中。如果在另一台未安装所选字体的计算机上打开项目,则会使用其他字体。为获得最佳兼容性,请使用 KiCad 字体。
文本标记

文本支持上标、下标、上横线标记、评估项目变量以及访问符号字段值。

Text supports markup for superscripts, subscripts, overbars, evaluating project variables, and accessing symbol field values.

特征 标记语法 结果

上标

Superscript

text^{superscript}

text^{superscript}

文本上标

textsuperscript

下标

Subscript

text_{subscript}

text_{subscript}

文本下标

textsubscript

上横杠

Overbar

~{text}

~{text}

文本

text

变量

Variables

${variable}

${variable}

变量值

variable_value

符号场

Symbol Fields

${refdes:field}

${refdes:field}

符号refdes的field_value

field_value of symbol refdes

变量必须先在原理图设置 中定义 才能使用。此外,还有一些 内置的系统文本变量
模拟指令

文本和文本框可以包含SPICE 仿真的仿真指令。 “从仿真中排除”复选框可防止文本被解释为仿真指令。

Text and textboxes can contain simulation directives for SPICE simulations. The Exclude from simulation checkbox prevents text from being interpreted as a simulation directive.

表格

Tables

您可以使用表格以表格形式组织文本。表格的边框、单元格大小、颜色和标题均可自定义。

You can use a table to organize text in a tabular format. Tables have customizable borders, cell sizes, colors, and headers.

桌子

要放置表格,请使用表24右侧工具栏中的按钮。单击画布放置表格的左上角,然后再次单击放置表格的右下角,即可完成表格的绘制。默认情况下,表格越大,添加的行和列就越多,但表格创建完成后,也可以添加或删除行和列。

To place a table, use the button in the right toolbar. Click in the canvas to place the top left corner of the table, then click again to place the bottom right corner of the table and finish drawing the table. The bigger you draw the table, the more rows and columns will be added by default, but rows and columns can be added or deleted after the table is created.

编辑表格属性

绘制完表格后,将显示“表格属性”对话框。您还可以通过其他几种方式打开“表格属性”对话框:

When you finish drawing a table, the Table Properties dialog appears. You can also open the Table Properties dialog in several other ways:

  • 选择表格中的任意单元格,右键单击,然后选择“编辑表格”Ctrl+ E

  • Select any cell in the table, right click, and select Edit Table (Ctrl + E)

  • 选中整个表格,右键单击,然后选择“属性… ” ( E)。您可以通过拖动选择整个表格,也可以选择单个单元格,然后右键单击并选择“选择表格”

  • Select the entire table, right click, and select Properties…​ (E). You can select the entire table with a drag selection or by selecting a single cell, then right clicking and selecting Select Table.

  • 在“表格单元格属性”对话框中,单击“编辑表格…”按钮。

  • Click the Edit Table…​ button in the Table Cell Properties dialog.

表格属性

此对话框允许您编辑整个表格的属性,包括每个单元格中的文本以及单元格之间的分隔符。要更改单元格中的文本格式,请编辑单个单元格的属性,而不是编辑整个表格的属性。

This dialog lets you edit the properties of the entire table, including the text in each cell and the separators between cells. To change the formatting of text in a cell, edit the properties of individual cells, instead of the properties for the entire table.

选中整个表格后, 也可以在属性管理器 中编辑表格的属性。

对话框左侧显示整个表格的可编辑网格。您可以通过单击网格中的单元格来编辑任意单元格的内容。您也可以通过选中单元格并使用属性管理器来编辑单元格中的文本。

The left side of the dialog displays an editable grid of the entire table. You can edit the contents of any cell by clicking on the cell in the grid. You can also edit the text in a cell by selecting the cell and using the Properties Manager.

表格单元格中的文本支持文本标记部分 中描述的标记(上标、下标、删除线等)。

对话框右侧包含表格的格式设置选项。

The right side of the dialog contains formatting options for the table.

  • “锁定”复选框控制表格是否被锁定。锁定的对象无法操作或移动,并且只有在“选择筛选器”面板中启用“锁定项目”选项后才能选择。

  • The Locked checkbox controls whether or not the table is locked. Locked objects may not be manipulated or moved, and cannot be selected unless the Locked Items option is enabled in the Selection Filter panel.

  • 外部边框”“表头边框”复选框分别控制是否在整个表格和顶行单元格周围绘制边框。启用“表头边框”后,顶行单元格下方的边框样式将使用这些外部边框设置,而不是行/列边框设置。表头边框的线宽由“宽度”字段控制。设置为 0 时,线宽使用在“原理图设置”的“格式”面板中配置的默认符号线宽。线条颜色由“颜色”选择器控制,线条样式可以使用“样式”下拉菜单设置为实线、虚线、点线、点划线或点点划线。

  • The External border and Header border checkboxes control whether there is a border drawn around the entire table and the cells in the top row, respectively. When Header border is enabled, the border below the cells in the top row is styled using these external border settings rather than the row/column line settings. The line width of the header borders is controlled by the Width field. When set to 0, the line width uses the default symbol line width configured in the Formatting panel of Schematic Setup. The line color is controlled by the Color picker, and the line style can be set to solid, dashed, dotted, dash-dot, or dash-dot-dot using the Style dropdown menu.

  • “行线”“列线”复选框分别用于在行之间添加水平线和在列之间添加垂直线。它们的格式选项与外部边框和标题边框相同。

  • The Row Lines and Column lines checkboxes enable horizontal lines between rows and vertical lines between columns, respectively. These have the same formatting options as the external and header borders.

编辑表格单元格属性

除了编辑整个表格的属性外,您还可以编辑单个单元格的属性。此操作会修改选定的单元格,但不会影响其他单元格。要打开“表格单元格属性”对话框,请双击单元格,或选择一个单元格,右键单击,然后选择“属性… ” ( E)。如果选择多个单元格,“属性”对话框将同时作用于所有单元格。

Instead of editing the properties of an entire table, you can also edit the properties of individual cells. This modifies selected cells, but does not affect other cells. To open the Table Cell Properties dialog, double click on a cell, or select a cell, right click, and choose Properties…​ (E). If you select multiple cells, the properties dialog will act on all of them at once.

您可以通过点击并拖动来选择多个单元格。
要选择一行或一列中的所有单元格,请选择该行或该列中的一个单元格,右键单击,然后选择“选择行”“选择列”。您可以通过先选中多个单元格,然后用这种方法选择多行或多列。
表格单元格属性

此对话框包含每个单元格中文本的格式设置选项。

This dialog contains formatting options for the text in each cell.

  • 水平对齐垂直对齐控制文本在单元格内的位置。

  • Horizontal alignment and Vertical alignment control how text is positioned within the cell.

  • 字体控制单元格中使用的文本字体。

  • Font controls the text font used in the cell.

  • 文本大小控制单元格中文本的大小。

  • Text size controls the size of the text in the cell.

  • “粗体”“斜体”复选框分别用于将文本加粗和倾斜。这些复选框有三种状态:关闭、开启和不更改。当同时编辑多个具有不同粗体/斜体设置的单元格时,“不更改”选项非常有用。

  • The Bold and Italic checkboxes bold and italicize the text, respectively. These are three-state checkboxes, which can be set to off, on, or no change. No change is useful when multiple cells with different bold/italic settings are being edited at the same time.

  • 文本颜色背景填充颜色选择器分别控制文本颜色和单元格背景颜色。

  • The Text color and Background fill color pickers control the color of the text and the cell background, respectively.

  • 单元格边距文本框控制单元格中文本的上、下、左、右周围的间距大小。

  • The Cell margins textboxes control the amount of spacing around the top, bottom, left, and right of the text in the cell.

您可以点击“编辑表格…”按钮打开整个表格的属性对话框。

You can click the Edit Table…​ button to open the properties dialog for the entire table.

当选中一个或多个表格单元格时, 也可以在属性管理器 中编辑表格单元格的属性。
编辑表格布局

表格的布局(大小、列数和行数)在创建表格时就已经确定,但创建后也可以编辑布局。

The layout of a table (size and number of columns and rows) is initially set when you create a table, but you can also edit the layout after creation.

要调整行或列的大小,请选择该行或列中的一个单元格,然后拖动右侧的手柄(更改列宽)或底部的手柄(更改行高)到所需的大小。

To resize a row or column, select a cell in that row or column, then drag the handle on the right (to change the column width) or the bottom (to change the row height) to the desired size.

要添加行或列,请选择新行或列所在位置旁边的单元格,右键单击,然后根据需要选择“上方添加行”“下方添加行”、 “上方添加列”“下方添加列” 。

To add rows or columns, select a cell next to where the new row or column should go, right click, then choose Add Row Above, Add Row Below, Add Column Before, or Add Column After, as desired.

要删除行或列,请选择要删除的行或列中的单元格,然后右键单击并选择“删除行”“删除列”。要删除多行或多列,请先选中所有要删除的行或列。

To delete rows or columns, select a cell in the row or column you want to delete, then right click and choose Delete Row(s) or Delete Column(s). To delete multiple rows or columns, start with a selection that spans all the rows or columns you want to delete.

您可以通过选择所有要合并的单元格,右键单击,然后选择“合并单元格”来将多个单元格合并为一个单元格。要取消合并,请选择合并后的单元格,右键单击,然后选择“取消合并单元格”

You can merge multiple cells into a single cell by selecting all the cells you want to merge, right clicking, and choosing Merge Cells. To unmerge them, select the merged cell, right click, and choose Unmerge Cells.

图形形状

Graphic Shapes

可以使用右侧工具栏中的相应按钮添加图形矩形(添加矩形图标)、圆形(添加圆形图标)、弧线(添加弧形图标)和直线( )。添加线条图标

Graphic rectangles (), circles (), arcs (), and lines () can all be added using their respective buttons in the right toolbar.

示意图中的图形矩形、圆形、弧形和直线

可以在每个形状的属性对话框中配置线条粗细、颜色和样式(实线、虚线或点线)E。矩形、圆形和弧形还可以设置填充颜色并移除轮廓。

Line width, color, and style (solid, dashed, or dotted) can be configured in the properties dialog for each shape (E). Rectangles, circles, and arcs can also have a fill color set and have their outlines removed.

图形矩形属性对话框

将图形的线宽设置为 0 将使用原理图的默认线宽,该线宽可在“原理图设置”中进行配置。虚线间距也可在此处配置。移除线条或填充颜色将使用颜色主题的图形颜色,该颜色可在 “首选项”中进行配置。

Setting a shape’s line width to 0 uses the schematic default line width, which is configurable in Schematic Setup. Spacing for line dashes is also configurable there. Removing a line or fill color uses the color theme’s graphics color, which is configurable in Preferences.

与导线类似,图形线条遵循线条绘制模式设置(90 度、45 度或自由角度),您可以使用左侧工具栏上的切换按钮(分别为 、 和 )进行设置90度线图标45度线图标+ 自由角度线图标ShiftSpace模式之间循环切换。

Like wires, graphic lines obey the line drawing mode setting (90 degree, 45 degree, or free angle), which you can set using the toggle buttons on the left toolbar (, , and , respectively). Shift+Space cycles through the modes.

与 PCB 走线一样/热键可以切换线路姿态。

As with PCB tracks, the / hotkey switches line posture.

位图图像

Bitmap Images

KiCad支持在原理图中插入图像。这些图像仅供设计过程中参考,不具有任何电气功能。

KiCad supports inserting images into the schematic. These are purely for reference during the design process and play no electrical role.

要添加参考图像,请使用图24右侧工具栏上的按钮并选择所需的参考图像文件。单击画布即可放置图像。

To add a reference image, use the button on the right toolbar and select the desired reference image file. Click in the canvas to place the image.

将图像添加到画布后,您可以使用移动工具(M)或在画布中拖动来重新定位图像。您可以通过拖动图像角点的编辑手柄来缩放图像。图像会围绕其参考点进行缩放;换句话说,参考点是图像中始终保持在画布上同一位置的点,无论图像如何缩放。参考点显示为第五个编辑手柄。它最初位于图像中心,但您可以通过在画布中拖动来重新定位参考点。

Once the image has been added to the canvas, you can reposition it using the move tool (M) or by dragging it in the canvas. You can scale it by dragging the editing handles at the corners of the image. The image is scaled around its reference point; in other words, the reference point is the point in the image that always stays in the same position in the canvas, no matter how the image is scaled. The reference point is shown as a fifth editing handle. Initially it is at the center of the image, but you can reposition the reference point by dragging it in the canvas.

图像属性

您还可以在图像属性对话框 ( ) 中重新定位或缩放图像。您可以在“常规”E选项卡中设置图像的精确XY坐标,并在“图像”选项卡中设置精确的缩放比例。您也可以 根据需要将其转换为灰度图像。此对话框中的位置和缩放是相对于图像中心而非其交互式参考点而言的。

You can also reposition or scale the image in its properties dialog (E). You can set the image’s exact Position X and Y in the General tab, and set an exact Scale factor in the Image tab. You can also Convert to Greyscale if you wish. Position and scale in this dialog are relative to the center of the image, not its interactive reference point.

批量编辑文本和图形

Bulk editing text and graphics

可以使用“编辑文本和图形属性”对话框(编辑编辑文本和图形属性… )批量编辑文本和图形(包括符号字段)的属性。该工具还可以修改导线和总线的视觉属性。

Properties of text and graphics, including symbol fields, can be edited in bulk using the Edit Text and Graphic Properties dialog (EditEdit Text and Graphic Properties…​). The tool can also modify visual properties of wires and buses.

eeschema 编辑文本和图形属性
示波器和滤波器

范围设置限制了工具只能编辑特定类型的对象。如果未选择任何范围,则不会进行任何编辑。

Scope settings restrict the tool to editing only certain types of objects. If no scopes are selected, nothing will be edited.

过滤器可将工具限制为编辑选定范围内的特定对象。只有当对象符合所有已启用且相关的过滤器时,才会对其进行修改(某些过滤器不适用于特定类型的对象。例如,符号字段过滤器不适用于导线,并且在更改导线属性时会被忽略)。如果未启用任何过滤器,则会修改选定范围内的所有对象。对于带有文本框的过滤器,支持通配符:`\n`* 可以匹配任意数量的任意字符(包括零个字符),`\n`?可以匹配任意单个字符。

Filters restrict the tool to editing particular objects in the selected scope. Objects will only be modified if they match all enabled and relevant filters (some filters do not apply to certain types of objects. For example, symbol field filters do not apply to wires and are ignored for the purpose of changing wire properties). If no filters are enabled, all objects in the selected scope will be modified. For filters with a text box, wildcards are supported: * matches any number of any characters, including none, and ? matches any single character.

按名称筛选字段,筛选出指定的符号、标签或工作表字段。

Filter fields by name filters to the specified symbol, label, or sheet field.

按父级引用标识符筛选项目:筛选出具有指定引用标识符的符号中的字段。按父级符号库 ID 筛选项目:筛选出具有指定库标识符的符号中的字段。 按父级符号类型筛选项目:筛选出所选类型(功率或非功率)的符号中的字段。

Filter items by parent reference designator filters to fields in the symbol with the specified reference designator. Filter items by parent symbol library id filters to fields in symbols with the specified library identifier. Filter items by parent symbol type filters to fields in symbols of the selected type (power or non-power).

按网络过滤器筛选指定网络上的线路和标签。

Filter items by net filters to wires and labels on the specified net.

仅将选定项目筛选器添加到当前选择中。

Only include selected items filters to the current selection.

可编辑属性

在对话框底部,可以将筛选对象的属性设置为新值。

Properties for filtered objects can be set to new values in the bottom part of the dialog.

下拉列表和文本框可以设置为-- leave unchanged --保留现有值。复选框可以选中或取消选中以启用或禁用更改,也可以切换到第三种“保持不变”状态。颜色属性必须选中才能更改值;棋盘格色板表示颜色将继承自原理图设置或网络类属性中的默认值。

Drop-down lists and text boxes can be set to -- leave unchanged -- to preserve existing values. Checkboxes can be checked or unchecked to enable or disable a change, but can also be toggled to a third "leave unchanged" state. Color properties must be checked to change the value; a checkerboard swatch indicates that the color will be inherited from the default value from the the schematic settings or net class properties.

可修改的文本属性包括字体文本大小文本方向 (右/上/左/下)、水平垂直对齐方式文本颜色、强调(粗体斜体)以及字段和字段名称的可见性。

Text properties that can be modified are font, text size, text orientation (right/up/leftdown), horizontal and vertical alignment, text color, emphasis (bold and italic), and visibility of fields and field names.

可以修改的图形和线属性包括线宽线型 (实线、虚线和点线)、线色、形状 填充颜色以及线连接点的连接点大小连接点颜色

Graphic and wire properties that can be modified are line width, line style (solid, dashed, and dotted lines), line color, fill color for shapes, and junction size and junction color for wire junctions.

图纸标题栏

Sheet title block

图纸标题栏可以使用“页面设置”工具进行编辑(页面设置工具)。您也可以双击图纸上任意位置来打开此工具。

The drawing sheet’s title block is edited with the Page Settings tool (). You can also open this tool by double clicking anywhere on any part of the drawing sheet.

页面设置对话框

标题栏中的每个字段以及纸张尺寸和方向均可编辑。如果选中某个字段的“导出到其他纸张”选项,则该字段将在所有纸张的标题栏中更新,而不仅仅是当前纸张。

Each field in the title block can be edited, as well as the paper size and orientation. If the Export to other sheets option is checked for a field, that field will be updated in the title block of all sheets, rather than only the current sheet.

您可以通过按“发布日期”旁边的左箭头按钮,将日期设置为今天或其他任何日期。请注意,原理图标题栏中列出的日期不会自动更新,只有在此对话框中更改后才会更新。

You can set the date to today’s or any other date by pressing the left arrow button next to Issue Date. Note that the date listed in the schematic title block is not automatically updated. It is only updated when changed in this dialog.

您还可以选择图纸文件来替换默认图纸。选择图纸时,您可以在文件浏览器中启用“嵌入文件”复选框,将图纸嵌入到原理图中,而不是引用外部文件。这意味着,即使原理图在另一台计算机上打开,而该计算机上的图纸文件不在相同的外部路径下,原理图的显示效果也与原图相同。有关更多信息,请参阅 嵌入文件文档

A drawing sheet file can also be selected to replace the default drawing sheet. When choosing a drawing sheet, you can enable the Embed File checkbox in the file browser to embed the drawing sheet in the schematic instead of referencing an external file. This means the schematic will appear the same when it is opened on another computer that does not have the drawing sheet file available at the same external file path. For more information, see the embedded files documentation.

标题栏

图纸编号(图纸 X/Y)会自动更新,但也可以使用“编辑编辑图纸页码…”手动设置图纸页码

The sheet number (Sheet X/Y) is automatically updated, but sheet page numbers can also be manually set using EditEdit Sheet Page Number…​.

原理图编辑便捷功能

Schematic editing convenience functions

原理图编辑器中有几个便捷功能,可以加快一些常见的编辑和连接操作。

There are several convenience features in the Schematic Editor that make some common editing and connection operations faster.

针脚助手

Pin helpers

您可以使用右键菜单中的 “引脚助手”工具,快速为选定的引脚添加导线、标签或未连接标记。这有助于您快速从符号或层级图中分离出未连接的引脚。选择“引脚助手”“导线”,导线工具将一次性从所有选定的引脚绘制导线。如果选择“未连接”,则会在每个选定引脚的末端添加未连接标记。如果选择“网络标签”“层级标签”“全局标签”,则会在每个选定引脚的末端放置相应类型的标签。每个标签的名称将设置为相应的引脚名称。新标签将保持选中状态,因此您可以根据是否希望保持引脚和标签之间的连接,使用“移动M”或“删除”按钮轻松地将它们从符号中移开。G

You can quickly add wires, labels, or no-connection markers to a selection of pins using the Pin Helpers tools in the right-click context menu. This can help you quickly break out unconnected pins from a symbol or hierarchical sheet. By selecting Pin HelpersWire, the wire tool will begin drawing a wire from all selected pins at once. If you select No Connect, no-connection markers will be added to the end of each selected pin. And if you choose Net Label, Hierarchical Label, or Global Label, a label of the respective type will be placed at the end of each selected pin. Each label’s name will be set to the corresponding pin name. The new labels will remain selected, so you can easily move them away from the symbol using M or G, depending on whether you wish to maintain a wired connection between the pins and the labels.

引脚辅助工具要求您选择单个引脚,而不是其父符号或图纸。如果在原理图编辑器首选项的“编辑选项”面板中启用了“单击引脚选择符号”选项,则无法单独选择符号引脚。因此,必须禁用此选项才能使用引脚辅助工具。

引脚助手全局标签

对象类型之间的转换

Converting between object types

可以通过右键单击现有标签和文本对象,然后从“更改为”子菜单中选择目标对象类型,将其更改为其他类型的标签或文本。源对象和目标对象允许的类型包括:本地标签、全局标签、层级标签、指令标签、文本对象和文本框。原始对象的值会在结果对象中保留:当文本对象转换为标签时,标签的值(网络名称)将是原始文本,反之亦然。

Existing labels and text objects can be changed to another type of label or text by right clicking the object(s) and selecting the target object type from the Change To submenu. The allowed types for source and target objects are local labels, global labels, hierarchical labels, directive labels, text objects, and text boxes. The value of the original object is preserved in the resulting object: when a text object is converted to a label, the label’s value (net name) will be the original text, and vice versa.

交换对象

Swapping objects

Alt您可以使用“交换”命令( +S ;也可在右键菜单中找到)交换两个选定对象的位置。此命令适用于许多原理图元素,包括符号、符号字段、标签、图形元素和文本。第一个对象的位置和旋转角度将变为第二个对象的位置和旋转角度,反之亦然。如果选择了两个以上的对象,则位置会循环:最后一个对象获得第一个对象的位置,第一个对象获得第二个对象的位置,依此类推。

You can swap the position of two selected objects using the Swap command (Alt+S; also available in the right-click context menu). This works on many schematic items, including symbols, symbol fields, labels, graphical items, and text. The first object is assigned the location and rotation of the second object, and vice versa. If there are more than two objects selected, the locations are cycled: the last object gets the position of the first object, the first object gets the location of the second, and so on.

swap 命令的一个用途是交换符号内的两个单元,例如双运算放大器中的两个放大器。您还可以使用 swap 命令并指定标签,以便快速修改符号引脚的网络分配。结合 PCB 上的交叉选择功能,这可以方便地进行原理图更改,从而简化布线。这有时被称为引脚或门交换。

原理图设置

Schematic Setup

“原理图设置”窗口用于设置当前活动原理图特有的原理图选项。例如,“原理图设置”窗口包含格式选项、电气规则配置、网络类别设置和原理图文本变量设置。

The Schematic Setup window is used to set schematic options that are specific to the currently active schematic. For example, the Schematic Setup window contains formatting options, electrical rule configuration, net class setup, and schematic text variable setup.

原理图格式

Schematic formatting

原理图设置格式

格式设置面板包含符号、文本、标签、图形和线条外观的设置。

The formatting panel contains settings for the appearance of symbols, text, labels, graphics, and wires.

符号单元表示法规定了多单元符号中每个单元在其参考标识符中的表示方式。默认情况下,每个单元都用不同的字母附加到参考标识符后,且不加分隔符,例如U1B符号的第二个单元U1,但此设置可以更改。可以使用数字代替字母,并且可以在符号标识符和单元标识符之间使用各种分隔符(例如.,` \n` -、`\n` _、`\n` 或不使用分隔符)。

Symbol unit notation sets how each unit of a multi-unit symbol is referred to in its reference designator. By default, a different letter for each unit is appended to the reference designator with no separator, for example U1B for the second unit of symbol U1, but this can be changed. Numbers can be used instead of letters, and various separators can be used between the symbol designator and the unit identifier (., -, _, or none).

默认文本大小设置文本、文本框和标签工具使用的默认文本高度。上标偏移比例控制文本与其上方的上标 ( ~{}) 之间的垂直间距,该比例为文本高度的百分比。 标签偏移比例控制本地标签文本与其连接的导线之间的垂直间距,该比例相对于标签文本大小。这也会影响符号引脚与其引脚编号之间的间距。全局标签边距比例 定义全局标签周围边框的大小,该比例相对于全局标签的文本大小。增加边距有助于避免文本与上标 ( ~{}) 或带有下延部分的字母重叠,但这可能会导致紧密排列的全局标签相互重叠。

Default text size sets the default text height used by the text, text box, and label tools. Overbar offset ratio controls the vertical spacing between text and an overbar (~{}) over that text, as a ratio of the text height. Label offset ratio controls the vertical spacing between a local label’s text and the attached wire, relative to the label’s text size. This also affects the spacing between symbol pins and their pin number. Global label margin ratio defines the size of the box around a global label, relative to the global label’s text size. Increasing the margin may be useful to avoid overlapping text with overbars (~{}) or letters with descenders, but this may cause closely packed global labels to overlap with each other.

默认线宽设置符号图形的默认线宽(如果符号未覆盖默认线宽)。引脚符号大小缩放符号引脚图形样式注释,例如倒置引脚上的气泡。

Default line width sets the default line width for symbol graphics, if the symbol does not override the default line width. Pin symbol size scales symbol pin graphic style annotations, such as the bubble on an inverted pin.

连接点大小设置原理图中的默认导线连接点大小。可以通过编辑单个连接点的属性来覆盖默认大小。连接宽度指定用于 符号引脚或导线末端连接网格ERC 检查的网格大小。原理图通常使用 50 mil 的网格进行电气连接,因此此值通常应保持设置为 50 mil。

Junction dot size sets the schematic’s default wire junction dot size. The default size can be overridden by editing an individual junction dot’s properties. Connection width specifies the grid size used for the Symbol pin or wire end off connection grid ERC check. Schematics typically use a 50 mil grid for electrical connections, so this should usually remain set at 50 mils.

工作点叠加设置用于配置 工作点仿真注释在原理图画布上的显示方式。有效数字设置控制电压和电流叠加层上打印的有效数字位数。范围设置控制用于显示电压和电流测量值的单位。

The Operating Point Overlay settings configure how operating point simulation annotations are displayed on the schematic canvas. The significant digits settings control the number of significant digits printed on voltage and current overlays. The range settings control the units used to display voltage and current measurements.

“显示页间引用”选项启用或禁用页间引用的显示 。页间引用是指全局标签旁边的一系列页码,这些页码链接到原理图中其他出现相同全局标签的位置。“显示本页引用”选项控制当前页是否包含在页码列表中。“标准”“缩写”选项决定是显示完整的页码列表,还是仅显示首尾页码。“前缀”“后缀”字段用于在页码列表前后添加可选字符。在下面的页间引用示例中,分别添加了前缀“1”和后缀“ [2 ”。]

Show inter-sheet references enables or disables the display of inter-sheet references, which are a list of page numbers next to a global labels that link to other places in the schematic where the same global label appears. Show own page reference controls whether the current page is included in the list of page numbers. Standard and abbreviated determine whether to display the complete list of page numbers or only the first and last page numbers. The prefix and suffix fields add optional characters before and after the list of page numbers. In the image of an inter-sheet reference below, a prefix and suffix of [ and ], respectively, have been added.

带有页间引用的全局标签

虚线的外观在“格式”部分进行控制。“虚线长度” 控制虚线的长度,“间距长度”控制虚线和点之间的间距。虚线和间距的长度与线宽相关:间距长度为 22表示间距长度为线宽的两倍。

Dashed line appearance is controlled in the Formatting section. Dash length controls the length of dashes, while Gap length controls the spacing between dashes and dots. The dash and gap lengths are relative to the line width: a gap length of 2 means twice the width of the line.

字段名称模板

Field name templates

原理图设置字段名称模板

字段名称模板是自动添加到原理图所有符号的空符号字段。当原理图中的每个符号都需要库符号中未定义的字段之外的其他字段时,例如制造商零件编号字段,这些模板非常有用。

Field name templates are empty symbol fields that are automatically added to all symbols in the schematic. These can be useful when every symbol in the schematic needs additional fields beyond the fields that are defined in the library symbols, for example a field for the manufacturer’s part number.

模板字段可以设置为可见或不可见,也可以设置为 URL 字段。

Template fields can be set as visible or invisible, and can also be set as URL fields.

在原理图设置中定义的字段名称模板仅适用于当前项目。也可以在“首选项”中定义字段名称模板 ,这些模板将应用于计算机上编辑的所有项目。

Field name templates that are defined in schematic setup apply only to the current project. Field name templates can also be defined in Preferences, which apply to all projects edited on your computer.

BOM预设

BOM presets

原理图设置 BOM 预设面板

BOM预设是 符号字段表BOM导出工具的已保存配置。预设分为两种类型:BOM预设用于配置符号字段表中显示的字段、它们的显示顺序以及如何使用它们对符号进行分组。这些字段也会直接用于BOM输出。BOM格式预设用于配置输出BOM文件的格式,包括用于分隔字段的分隔符。两种类型的预设都在符号字段表中创建,但可以在此处列出和删除。

BOM presets are saved configurations for the Symbol Fields Table and BOM export tool. There are two types of presets. BOM presets configure which fields are displayed in the symbol fields table, which order they are displayed in, and how they are used to group symbols. These fields are also directly used in the BOM output. BOM formatting presets configure the output BOM file format, including which separator characters are used to separate fields. Both types of presets are created in the Symbol Fields Table, but can are listed and can be deleted here.

ERC违规严重程度和引脚冲突图

ERC violation severity and pin conflicts map

“违规严重性”面板允许您配置应将哪些类型的 ERC 消息报告为错误、警告或忽略。

The Violation Severity panel lets you configure what types of ERC messages should be reported as Errors, Warnings, or ignored.

ERC严重性设置示意图

引脚冲突映射表允许您配置连接规则,根据相互连接的引脚类型定义错误和警告的电气条件。例如,默认情况下,当一个输出引脚连接到另一个输出引脚时会产生错误。

The Pin Conflicts Map allows you to configure connectivity rules to define electrical conditions for errors and warnings based on what types of pins are connected to each other. For example, by default an error is produced when an output pin is connected to another output pin.

原理图 ERC 引脚冲突图

这些面板在ERC 部分有更详细的解释。

These panels are explained in more detail in the ERC section.

网络类

Net classes

原理图设置网络类面板

“网络类别”面板允许您管理项目的网络类别,并使用模式将网络分配给相应的网络类别。在此面板中管理网络类别与在 “电路板设置”对话框中管理网络类别的功能相同。您还可以使用网络类别指令网络标签,通过图形化分配的方式在原理图中将网络分配给相应的网络类别。

The Net Classes panel allows you to manage net classes for the project and assign nets to net classes with patterns. Managing net classes in this panel is equivalent to managing them in the Board Setup dialog. Nets can also be assigned to net classes in the schematic using graphical assignments with net class directives or net labels.

基于模式的网络类分配在网络类部分有更详细的解释 。

Pattern-based net class assigment is explained in more detail in the net classes section.

总线别名定义

Bus alias definitions

总线别名定义

“总线别名定义”面板允许您创建总线别名,总线别名是总线中信号组的名称。有关总线别名的更多信息,请参阅总线别名文档

The Bus Alias Definitions panel allows you to create bus aliases, which are names for groups of signals in a bus. For more information about bus aliases, see the bus alias documentation.

文本变量

Text variables

原理图设置文本变量

可以在“文本变量”部分创建文本变量。KiCad 会将变量名替换为分配给该变量的文本字符串。无论变量名出现在变量替换语法中的哪个位置,都会发生这种替换${VARIABLENAME}

Text variables can be created in the Text Variables section. KiCad will substitute the variable name with the text string assigned to the variable. This substitution happens anywhere the variable name is used inside the variable replacement syntax of ${VARIABLENAME}.

例如,您可以创建一个名为 `<variable>` 的变量VERSION,并将其文本替换设置为 `<variable> 1.0`。现在,在原理图中的任何文本对象中,您都可以输入 ` <variable> ${VERSION}`,KiCad 会将其显示为 `<variable>` 1.0。如果您将 `<variable>` 的值更改为 `<variable>` 2.0,则所有包含 `<variable>` 的文本对象${VERSION}都会自动更新。您还可以混合使用普通文本和变量。例如,您可以创建一个文本对象,其中包含文本 `<variable>`,Version: ${VERSION}该文本将显示为 `<variable>` Version: 1.0

For example, you could create a variable named VERSION and set the text substitution to 1.0. Now, in any text object in the schematic, you can enter ${VERSION} and KiCad will display this as 1.0. If you change the value to 2.0, every text object that includes ${VERSION} will be updated automatically. You can also mix regular text and variables. For example, you can create a text object with the text Version: ${VERSION} which will be displayed as Version: 1.0.

也可以在电路板设置中创建文本变量 。文本变量是项目范围内的;在原理图编辑器中创建的变量也可以在电路板编辑器中使用,反之亦然。

Text variables can also be created in Board Setup. Text variables are project-wide; variables created in the schematic editor are also available in the board editor, and vice versa.

此外,还有一些内置的系统文本变量

There are also a number of built-in system text variables.

嵌入文件

Embedding files

外部文件可以嵌入到原理图中。嵌入文件会将文件的副本存储在原理图文件中。这样,设计就可以引用嵌入的文件副本,而无需依赖外部文件,从而使项目更具可移植性。字体、数据手册、绘图纸、SPICE 模型和封装 3D 模型都可以嵌入到 KiCad 中使用。其他任意文件也可以嵌入到项目中,以便稍后导出,但 KiCad 的任何功能都不会使用这些文件。嵌入到原理图中的文件必然会增加原理图文件的大小,尽管文件在嵌入之前会进行压缩以尽量减少所需的空间。

External files can be embedded within a schematic. Embedding a file stores a copy of the file inside the schematic file. The design can then refer to the embedded copy of the file instead of the external file, which makes the project more portable as it doesn’t rely on an external file. Fonts, datasheets, drawing sheets, SPICE models, and footprint 3D models can be embedded and used within KiCad. Other arbitrary files can also be embedded to store them in the project for later export, but they are not used by any KiCad functionality. Files embedded in a schematic necessarily increase the schematic’s file size, although files are compressed before being embedded to minimize the space required.

嵌入文件

嵌入文件在原理图设置的“嵌入文件”部分进行管理。原理图中嵌入的所有文件都会显示在此处。要将文件嵌入原理图,请单击按钮 小文件夹 16并选择该文件。文件随后会被嵌入原理图,并与其嵌入引用一起列在嵌入文件列表中。嵌入引用是嵌入文件的唯一标识符,以“.”开头kicad-embed://。您可以在原理图编辑器中的其他位置使用此嵌入引用,就像引用外部文件路径一样。您可以通过右键单击并选择“复制嵌入引用”来复制嵌入引用。要删除嵌入文件,请单击小垃圾 16按钮。指向已删除文件的所有剩余链接都将失效。

Embedded files are managed in the Embedded Files section of Schematic Setup. All files embedded in a schematic are shown here. To embed a file inside a schematic, click the button and select the file. The file is then embedded inside the schematic and is listed in the embedded files list along with its embedded reference. The embedded reference is a unique identifier for the embedded file that begins with kicad-embed://. You can use the embedded reference elsewhere in the Schematic Editor to refer to the embedded file as if it were an external file path. You can copy the embedded reference by right clicking and selecting Copy Embedded Reference. To remove an embedded file, click the button. Any remaining links to the removed file will become invalid.

您可以通过文件浏览器直接嵌入数据手册、SPICE 模型和图纸。只需在文件浏览器中启用 “嵌入文件”选项,即可将文件添加到符号(数据手册SPICE 模型)或原理图(图纸) 。这是一种简便的方法,无需在原理图设置中添加文件,也无需通过嵌入引用的方式进行引用;最终效果相同。

要在原理图中使用的任何字体中嵌入字体,请选中“嵌入字体”复选框。原理图中使用的所有字体都将被嵌入,因此无论字体文件是否已安装,都可以在任何计算机上编辑使用该字体的文本。

To embed any fonts used in a schematic, check the Embed fonts checkbox. All fonts used in the schematic will be embedded, so text using that font can be edited on any computer regardless of whether the font file is installed.

您还可以将文件嵌入库符号中。此类文件可在符号内部访问,但无法在更大的原理图或其他符号中使用。将符号添加到原理图时,嵌入在符号中的文件会被去重:如果一个文件嵌入在一个符号中,并且该符号的多个实例被添加到原理图中,则只会嵌入该文件的一个副本,所有符号实例都将引用同一个嵌入的文件。

You can also embed files in a library symbol. Such files will be available within the symbol, but not within the larger schematic or in other symbols. Files embedded in a symbol are deduplicated when the symbol is added to a schematic: if a file is embedded in a symbol, and multiple instances of that symbol are added to the schematic, only one copy of the file will be embedded, and all of the symbol instances will refer to the same embedded file.

例如,要将数据手册嵌入到项目中并在多个符号中使用它,您可以使用原理图设置对话框嵌入数据手册,复制内部引用,然后将内部引用粘贴到每个使用该数据手册的符号的数据手册字段中。这样,每个符号就都拥有了对嵌入数据手册的通用引用。或者,您可以将数据手册嵌入到库符号中。在这种情况下,当符号添加到原理图时,每个符号都已嵌入了数据手册。不过,实现相同目的的更便捷方法是打开符号的属性对话框,浏览并找到数据手册文件,然后在文件浏览器中启用“嵌入文件” 选项。同样,这可以应用于原理图中的符号,也可以应用于源符号库中的符号。

As an example, to embed a datasheet in a project and use it within several symbols, you could embed the datasheet using the schematic setup dialog, copy the internal reference, and paste the internal reference into the datasheet field of each symbol that uses that datasheet. Each symbol would then have a portable reference to the embedded datasheet. Alternatively, you could embed the datasheet within the library symbol. In this case, each symbol will already have the datasheet embedded when the symbol is added to a schematic. A more convenient way to achieve the same thing, however, is to open the symbol’s properties dialog, browse for a datasheet file, and enable the Embed File option in the file browser. Again, this could be done for a symbol in the schematic or for a symbol in the source symbol library.

文件也可以嵌入到电路板中。

Files can also be embedded in boards.

导入设置

Importing settings

您可以从现有原理图中导入部分或全部原理图设置。这样,您可以选择一个原理图用作模板,并选择要导入的设置。

You can import some or all of the schematic setup from an existing schematic. This allows you to choose a schematic to use as a template and select which settings to import.

导入设置

要导入设置,请单击“原理图设置”对话框底部的“从其他项目导入设置…”.kicad_sch按钮,然后选择 要从中导入的文件。选择要导入的设置,当前设置将被所选原理图中的值覆盖。

To import settings, click the Import Settings from Another Project…​ button at the bottom of the Schematic Setup dialog and then choose the .kicad_sch file you want to import from. Select which settings you want to import and the current settings will be overwritten with the values from the chosen schematic.

可导入的设置包括:

The settings that are available to import are:

  • 格式偏好

  • Formatting preferences

  • 字段名称模板

  • Field name templates

  • BOM预设

  • BOM presets

  • BOM格式预设

  • BOM format presets

  • 违规严重程度

  • Violation severities

  • 冲突图

  • Pin conflict map

  • 网络类

  • Net classes

  • 总线别名定义

  • Bus alias definitions

  • 文本变量

  • Text variables

打开旧式原理图

Opening legacy schematics

现代版本的 KiCad 都能打开用旧版本 KiCad 创建的项目。但是,某些旧版本 KiCad 创建的原理图在打开时需要特别注意,以防止数据丢失。

Modern versions of KiCad can always open projects created in older versions of KiCad. However, schematics created in some older versions of KiCad have special considerations that must be observed when opening them in order to prevent any data loss.

打开 KiCad 5.0 和 5.1 原理图

Opening KiCad 5.0 and 5.1 schematics

<projectname>-cache.lib现代版本的 KiCad 可以打开在 KiCad 6.0 之前的版本中创建的原理图,但必须存在缓存库文件( )才能正确加载原理图。

Modern versions of KiCad can open schematics created in versions prior to KiCad 6.0, but the cache library file (<projectname>-cache.lib) must be present to load the schematic correctly.

自 6.0 版本起,KiCad 会将项目中使用的所有符号存储在原理图中。这意味着,即使项目中使用的库未安装或已更改,您也可以在任何计算机上打开使用 KiCad 6.0 或更高版本创建的原理图。现代 KiCad 原理图文件使用 .kbd.kicad_sch扩展名。

Since version 6.0, KiCad stores all symbols used in a project in the schematic. This means that you can open a schematic made in KiCad 6.0 or later on any computer, even if the libraries used in the project are not installed or have changed. Modern KiCad schematic files use the .kicad_sch extension.

在 6.0 版本之前,KiCad 并不直接在原理图中存储符号。相反,KiCad 存储的是符号及其库的引用。它还会将项目使用的每个符号的副本存储在一个单独的缓存库文件中(<projectname>-cache.lib)。只要项目中包含了缓存库,就可以在不包含系统库文件的情况下分发项目,因为如果原理图中引用的库文件缺失,KiCad 可以从缓存库中加载任何所需的符号作为备用方案。旧版 KiCad 原理图文件使用 .kbd.sch扩展名。

Prior to version 6.0, KiCad did not store symbols in the schematic. Instead, KiCad stored references to the symbols and their libraries. It also stored a copy of every symbol used by the project in a separate cache library file (<projectname>-cache.lib). As long as the cache library was included with the project, the project could be distributed without the system library files, because KiCad could load any needed symbols from the cache library as a fallback if the libraries referenced in the schematic were missing. Legacy KiCad schematic files use the .sch extension.

打开旧版原理图时,KiCad 会在缓存库中查找原理图中使用的所有符号。保存旧版原理图时,KiCad 会将其另存为现代原理图格式的新文件.kicad_sch,并将必要的符号嵌入到原理图本身中。原始的旧版原理图和缓存库将保持不变,但原理图保存为现代格式后,它们就不再需要了。

When you open a legacy schematic, KiCad will look in the cache library to find all of the symbols used in the schematic in the cache library. When you save the legacy schematic, KiCad will save it as a new file in the modern schematic format (.kicad_sch), with the necessary symbols embedded in the schematic itself. The original legacy schematic and the cache library will remain, unmodified, but they are no longer necessary once the schematic has been saved in the modern format.

在 KiCad 6.0 版本之前创建的项目必须包含缓存库。如果缺少缓存库,当系统符号库被修改、重组、移动或删除时,原理图将丢失符号信息。旧版本 KiCad 自带的库与现代 KiCad 库有很大不同,因此实际上,如果缺少缓存库,KiCad 几乎总是无法打开旧版本项目。

打开旧版原理图时,KiCad 可能会显示“项目修复助手”对话框。这意味着缓存库中的一个或多个符号与外部库中的对应符号不匹配。如果需要,此对话框可帮助您将缓存库中的符号“修复”到原理图中。您也可以随时使用“工具”“修复符号…”打开此修复对话框。使用此修复工具必须存在缓存库文件。

When you open a legacy schematic, KiCad may display the Project Rescue Helper dialog. This means that one or more symbols in the cache library do not match the corresponding symbol in the external library. The dialog helps you "rescue" symbols from the cache library into your schematic, if desired. You can also open the rescue dialog at any time using ToolsRescue Symbols…​. The cache library file must be present in order to use the rescue tool.

救援冲突对话

救援对话框会列出缓存库和外部符号库中所有不匹配的符号。造成这种差异的原因可能是:

The rescue dialog lists all symbols that don’t match between the cache library and the external symbol library. The discrepancy can be because:

  • 缓存符号或库符号已被修改,因此这两个符号不再匹配,或者

  • the cached symbol or the library symbol has been modified, so the two symbols no longer match, or

  • 缓存的符号在符号库中没有对应的符号,因为符号或库已被移动、重命名、删除,或者当前计算机上不存在。

  • the cached symbol does not have a corresponding symbol in the symbol library, because the symbol or library was moved, renamed, deleted, or is not present on the current computer.

对于列表中的每个符号,选中该符号后,对话框会显示该符号每个实例的引用指示符和值,并显示该符号的预览。如果系统符号库中存在对应的符号,对话框会同时显示这两个符号副本以进行比较。如果该符号仅存在于缓存库中,对话框则仅显示缓存的符号。

For each symbol in the list, selecting the symbol displays the reference designator and value for each instance of the symbol, and shows a visual preview of the symbol. If a corresponding symbol exists in the system symbol library, the dialog shows both copies of the symbol for comparison. If the symbol only exists in the cache library, the dialog only shows the cached symbol.

在这个例子中,项目最初使用的是阴极朝左的二极管,但库中现在包含的二极管阴极朝右。这一更改会破坏设计,因此务必按照原始设计者的意图使用缓存的符号。

In this example, the project originally used a diode with the cathode facing left, but the library now contains one with the cathode facing right. This change would break the design, so it would be important to use the cached symbol as the original designer intended.

在此处按下“恢复符号”按钮,会将缓存库中选定的符号保存到一个特殊rescue库中(<projectname>-rescue.kicad_sym)。原理图中的相应符号将更新为使用新恢复的符号。任何未选中的符号都不会被恢复,但稍后可以在原理图中更新它们的符号链接。

Pressing Rescue Symbols here will cause the selected symbols from the cache library to be saved into a special rescue library (<projectname>-rescue.kicad_sym). The corresponding symbols in the schematic will be updated to use the newly rescued symbols. Any unselected symbols will not be rescued, but their symbol linkage can be updated in the schematic later.

或者,按下“跳过符号恢复”按钮将退出对话框而不恢复任何符号。KiCad 将使用外部库中找到的符号版本。您可以再次运行恢复功能(使用“工具”“恢复符号…”),或者在符号属性中手动编辑符号链接。

Alternatively, pressing Skip Symbol Rescue will exit the dialog without rescuing any symbols. KiCad will use the versions of the symbols found in the external libraries. You can run the rescue function again with ToolsRescue Symbols…​, or manually edit symbol linkage in the symbol’s properties.

如果您不想再看到此对话框,可以按“不再显示” 。这与按“跳过符号救援”按钮的效果相同,该按钮将对当前原理图和所有后续原理图都有效。

If you would prefer not to see this dialog, you can press Never Show Again. This has the same effect as pressing Skip Symbol Rescue for the current schematic and all future schematics.

如果旧版原理图中的某个符号在缓存库或外部库中都找不到,KiCad 将无法恢复该符号。此时,原理图中会插入一个占位符符号来代替它,如下所示。

If a symbol in a legacy schematic cannot be found in either the cache library or the external library, KiCad cannot rescue that symbol. A placeholder symbol is inserted into the schematic in its place, as shown below.

您可以使用“更改符号”“编辑符号库链接”对话框尝试重新映射这些孤立的符号,但这两种方法都可能需要手动修正原理图。有关这些工具的详细说明,请参阅“更新和交换符号”部分。

You can attempt to remap these orphaned symbols using the Change Symbols or Edit Symbol Library Links dialogs, but either option may require manual corrections to the schematic. These tools are explained in more detail in the Updating and exchanging symbols section.

未完全恢复的示意图中缺少符号

打开 5.0 版本之前的原理图

Opening pre-5.0 schematics

现代版本的 KiCad 可以打开在 KiCad 5.0 之前的版本中创建的原理图,但您需要进行符号重映射过程才能在不丢失符号信息的情况下打开原理图。

Modern versions of KiCad can open schematics created in versions prior to KiCad 5.0, but you will need to go through a symbol remapping process to open the schematic without losing symbol information.

自 5.0 版本起,KiCad 原理图使用符号名称和库名称来指代特定符号。即使多个库中都包含同名符号,设计者想要使用的符号也能被明确指定。

Since version 5.0, KiCad schematics refer to specific symbols using both the symbol and library name. Even if multiple libraries each contain a symbol with the same name, the designer’s intended symbol is unambiguously specified.

在 5.0 版本之前,KiCad 原理图仅存储符号名称,而不存储库名称。原理图中的符号是通过在项目的库列表中搜索匹配的符号,间接映射到原始库的。当您打开 5.0 版本之前的原理图时,KiCad 会尝试自动“重新映射”符号,将每个裸符号名称替换为完整的符号库和符号名称对。原始原理图将备份到一个rescue-backup文件夹中。

Prior to version 5.0, KiCad schematics stored only the symbol name, not the library name. Symbols in the schematic were indirectly mapped back to the original library by searching through the project’s library list for a matching symbol. When you open a pre-5.0 schematic, KiCad will attempt to automatically "remap" the symbols so that each bare symbol name is replaced with a fully-specified symbol library and symbol name pair. The original schematics will be backed up in a rescue-backup folder.

您可以跳过自动重映射,但需要使用“更改符号”对话框自行重映射符号。您也可以使用“工具”“重映射旧版库符号…”重新运行“重映射符号”工具。

You can skip the automatic remapping, but you will need to remap the symbols yourself using the Change Symbols dialog. You can also re-run the Remap Symbols tool using ToolsRemap Legacy Library Symbols…​.

重新映射符号对话框

层级示意图

Hierarchical schematics

介绍

Introduction

在 KiCad 中,多页原理图采用层级结构:只有一个根页,其他页可以作为根页或其他子页的子页创建。如有需要,可以在层级结构中多次包含同一页。

In KiCad, multi-sheet schematics are hierarchical: there is a single root sheet, and additional sheets are created as subsheets of either the root sheet or another subsheet. Sheets can be included in a hierarchy multiple times, if desired.

精心绘制分层结构的原理图可以提高原理图的清晰度,并减少重复绘制。

Carefully drawing a schematic as a hierarchical design improves schematic legibility and reduces repetitive drawing.

创建分层原理图从根图开始。具体步骤是:首先创建子图,然后在子图中绘制电路,最后建立各图之间的必要电气连接。可以使用分层引脚和标签在子图中的网络和父图中的网络之间建立连接,也可以使用全局标签在层级结构中的任意两个网络之间建立连接。

Creating a hierarchical schematic starts from the root sheet. The process is to create a subsheet, then draw the circuit in the subsheet and make the necessary electrical connections between sheets. Connections can be made between nets in a subsheet and nets in the parent sheet using hierarchical pins and labels, or between any two nets in the hierarchy using global labels.

向设计中添加图纸

Adding sheets to a design

S您可以使用“添加层级图纸”工具(快捷键或 右侧工具栏中的按钮)向设计中添加子图纸添加层级式工作表图标 。启动该工具,然后在画布上单击两次以绘制子图纸符号的左上角和右下角。确保图纸轮廓足够大,以便容纳 您稍后要添加的层级图钉

You can add a subsheet to a design with the Add Hierarchical Sheet tool (S hotkey, or the button in the right toolbar). Launch the tool, then click twice in the canvas to draw the upper left and lower right corners of the subsheet symbol. Make the sheet outline large enough to fit the hierarchical pins you will add later.

绘制层级结构图

将出现“工作表属性”对话框,提示您输入工作表名称和文件名。

The Sheet Properties dialog will appear and prompt you for a sheet name and filename.

分层工作表属性

图纸名称必须唯一,因为它将用于子图纸中所有网络的完整网络名称。例如,net1图纸中 带有本地标签的网络sheet1的完整网络名称为 `<net_name> /sheet1/net1`。图纸名称还用于在图形用户界面 (GUI) 的多个位置引用该图纸,包括 标题栏层级导航器。图纸名称也可以在层级导航器中更改。

The sheet name must be unique, as it is used in the full net name for any nets in the subsheet. For example, a net with the local label net1 in the sheet sheet1 would have a full net name of /sheet1/net1. The sheet name is also used to refer to the sheet in various places in the GUI, including the title block and the hierarchy navigator. The sheet name can also be changed in the hierarchy navigator.

图纸文件指定新图纸的保存位置或加载位置。图纸文件的路径可以是相对路径,也可以是绝对路径。通常建议将子图纸文件保存在项目目录中,并使用相对路径,以便项目具有可移植性。

The sheet file specifies the file that the new sheet will be saved to or loaded from. The path to the sheet file can be relative or absolute. It is usually preferable to save subsheet files in the project directory and use a relative path so that the project is portable.

同一个图纸文件可以在一个项目中多次使用,只需为每个重复使用的图纸指定相同的文件名即可;图纸中绘制的电路图每次使用都会实例化一次,并且在一个实例中所做的任何编辑都会反映在其他实例中。

A single sheet file can be used more than once in a project by specifying the same filename for each repeated sheet; the circuit drawn in the sheet will be instantiated once per usage, and any edits in once instance will be reflected in the other instances.

可以在多个项目之间共享图纸文件,以便跨项目复用设计。但是,由于路径可移植性问题以及在编辑共享图纸时可能意外更改其他项目的风险,不建议这样做。

您可以在此处配置图纸的页码。页码会显示在图纸标题栏层级导航器中,并且在层级导航器以及打印或绘图时,图纸会按页码排序 。您也可以在层级导航器中更改图纸页码,或者通过“编辑”“编辑图纸页码…”来更改当前页的页码 。

The sheet’s page number is configurable here. The page number is displayed in the sheet title block and the hierarchy navigator, and sheets are sorted by page number in the hierarchy navigator and when printing or plotting. The sheet number can also be changed in the hierarchy navigator or for the current page with EditEdit Sheet Page Number…​.

图纸的其他属性包括:排除在仿真之外排除在物料清单之外排除在电路板之外以及 不填充。当为图纸设置了这些属性中的任何一个时,该图纸中的所有符号都会继承这些属性, 就像这些属性是直接设置在符号本身上一样

Other attributes for sheets are Exclude from simulation, Exclude from bill of materials, Exclude from board, and Do not populate. When any of these attributes are set for a sheet, they are inherited by all symbols in that sheet, as if they were set on the symbols themselves.

此外,还有多种图形选项可供选择。“边框宽度”设置图纸形状周围边框的宽度。“边框颜色”“背景填充”分别设置图纸形状边框和填充的颜色。如果未设置颜色,则会显示棋盘格色板,并使用颜色主题中的默认值。

Several graphical options are also available. Border width sets the width of the border around the sheet shape. Border color and Background fill set the color for the border and fill of the sheet shape, respectively. If no color is set, a checkerboard swatch is shown and the default values from the color theme are used.

图纸支持任意自定义字段,分别可通过“添加”和 加号图标“ 删除”按钮进行添加和删除。图纸字段可通过勾选“显示”垃圾桶图标复选框选择性地显示在原理图上,并且可通过文本变量 从图纸内部或其他图纸字段访问这些字段。

Sheets support arbitrary custom fields, which can be added and removed with the and buttons, respectively. Sheet fields can be optionally displayed on the schematic by checking their Show box, and they can be accessed from inside the sheet or in other sheet fields using text variables.

E可以通过选择图纸符号并使用快捷键,或者右键单击图纸符号并选择“属性…”来随时访问图纸属性对话框。

The Sheet Properties dialog can be accessed at any time by selecting a sheet symbol and using the E hotkey, or by right-clicking on a sheet symbol and selecting Properties…​.

Navigating between sheets

您可以通过双击子工作表的形状,或者右键单击子工作表并选择“进入工作表” ,从父工作表进入层级式工作表。

You can enter a hierarchical sheet from the parent sheet by double-clicking the child sheet’s shape, or right-clicking the child sheet and selecting Enter Sheet.

使用顶部工具栏中的按钮返回父图纸 向上箭头图标,或者在原理图的空白部分单击鼠标右键并单击“离开图纸”

Return to the parent sheet by using the button in the top toolbar, or by right-clicking in an empty part of the schematic and clicking Leave Sheet.

你可以用这个按钮跳转到下一张工作表 右箭头图标,或者用这个左箭头图标按钮跳转到上一张工作表。

You can jump to the next sheet with the button, or to the previous sheet with the button.

或者,您可以使用层级导航器跳转到任意工作表。要打开层级导航器,请单击 层级导航图标左侧工具栏中的按钮。层级导航器会停靠在屏幕左侧。设计中的每个工作表都会显示为树状结构中的一个项目。单击工作表名称即可在编辑画布中打开该工作表。您还可以使用层级导航器重命名或重新编号工作表:右键单击工作表名称,然后选择“编辑页码”“重命名”

Alternatively, you can jump to any sheet with the hierarchy navigator. To open the hierarchy navigator, click the button in the left toolbar. The hierarchy navigator docks at the left of the screen. Each sheet in the design is displayed as an item in the tree. Clicking a sheet name opens that sheet in the editing canvas. You can also use the hierarchy navigator to rename or renumber a sheet by right clicking on the sheet name and selecting Edit page number or Rename.

层级导航器

板材之间的电气连接

Electrical connections between sheets

标签概览

Label overview

图纸之间的电气连接通过标签实现。KiCad 中有几种标签,每种标签的连接范围都不同。

Electrical connections between sheets are made with labels. There are several kinds of labels in KiCad, each with a different connection scope.

  • 本地标签只能在工作表内部建立连接。因此,本地标签不能用于连接不同工作表。本地标签是通过按钮添加的本地标签图标

  • Local labels only make connections within a sheet. Therefore local labels cannot be used to connect between sheets. Local labels are added with the button.

  • 全局标签允许在原理图中任意位置建立连接,不受图纸限制。全局标签通过按钮添加 全球标签图标

  • Global labels make connections anywhere in a schematic, regardless of sheet. Global labels are added with the button.

  • 层级标签连接到父工作表中可访问的层级工作表图钉。层级设计依赖于层级标签和图钉来建立父工作表和子工作表之间的连接。您可以将图钉理解为定义工作表的界面;子工作表中的层级标签连接到父工作表中可见的相应图钉。可以使用按钮在子工作表中添加层级标签 层级标签图标

  • Hierarchical labels connect to hierarchical sheet pins accessible in the parent sheet. Hierarchical designs rely on hierarchical labels and pins to make connections between parent sheets and child sheets. You can think of sheet pins as defining the interface for a sheet; hierarchical labels within the child sheet connect to corresponding sheet pins which are visible in the parent sheet. Hierarchical labels are added inside a child sheet using the button.

同一张图纸上,名称相同的标签会连接在一起,无论标签类型如何。
隐藏的电源引脚也可以被视为全局标签,因为它们可以连接到原理图层次结构中的任何位置。

分层片状引脚

Hierarchical sheet pins

在子图纸中放置层级标签后,即可在父图纸中的子图纸符号中添加匹配的层级图纸引脚。然后,您可以使用导线、标签和总线将层级引脚连接到子图纸符号。子图纸符号中的层级图纸引脚与子图纸本身中匹配的层级标签相连。

After placing hierarchical labels within the subsheet, matching hierarchical sheet pins can be added to the subsheet symbol in the parent sheet. You can then make connections to the hierarchical pins with wires, labels, and buses. Hierarchical sheet pins in a subsheet symbol are connected to the matching hierarchical labels in the subsheet itself.

必须先在子图纸中定义层级标签,然后才能将相应的层级图纸图钉导入到图纸符号中。
带引脚的分层图纸符号

对于子图纸中的每个层级标签,单击 放置图钉图标右侧工具栏中的按钮,然后单击图纸符号,即可将相应的层级图钉添加到图纸符号上。第一个未匹配的层级标签对应的图钉将附加到光标处,您可以将其放置在图纸符号边界上的任意位置。再次单击该工具将继续添加图钉,直到子图纸中的所有层级标签都在图纸符号上拥有匹配的图钉为止。您也可以通过在图纸符号的右键菜单中选择“放置图钉”来导入图钉。

For every hierarchical label in the subsheet, add the corresponding hierarchical pin onto the sheet symbol by clicking the button in the right toolbar, then clicking on the sheet symbol. A sheet pin for the first unmatched hierarchical label will be attached to the cursor, where it can be placed anywhere along the border of the sheet symbol. Clicking again with the tool will continue to add additional sheet pins until all of the hierarchical labels in the subsheet have a matching sheet pin on the sheet symbol. Sheet pins can also be imported by selecting Place Sheet Pin in a sheet symbol’s right-click context menu.

您可以在“图钉属性”对话框中编辑图钉的属性。双击图钉、选择图钉并使用E快捷键、或右键单击图钉并选择 “属性…”即可打开此对话框。

You can edit the properties of a sheet pin in the Sheet Pin Properties dialog. Open this dialog by double-clicking a sheet pin, selecting a sheet pin and using the E hotkey, or right-clicking a sheet pin and selecting Properties…​.

薄板销属性对话框

可以在文本框中编辑图纸图钉名称,也可以从子图纸的层级标签下拉列表中选择。图纸图钉名称必须与子图纸中对应的层级标签名称一致,因此如果更改图钉名称,则必须同时更改标签名称。

The sheet pin’s name can be edited in the textbox or by selecting from the dropdown list of hierarchical labels in the subsheet. A sheet pin’s name has to match the corresponding hierarchical label in the subsheet, so if you change a pin name you must change the label name as well.

形状设置会改变引脚的形状,但不会影响其电气特性。它可以设置为输入、输出、双向、三态或被动模式。引脚的字体字号颜色和强调方式(粗体或斜体)也可以更改。

Shape changes the shape of the sheet pin, and has no electrical effect. It can be set to Input, Output, Bidirectional, Tri-state, or Passive. The pin’s font, text size, color, and emphasis (bold or italic) can also be changed.

同步图纸图钉

Syncing sheet pins

管理层级标签和图纸图钉之间连接的另一种方法是使用“同步图纸图钉”工具。可以通过 同步工作表图钉图标 右侧工具栏中的按钮启动此工具,也可以在图纸符号的右键菜单中选择“同步图纸图钉”来启动。

Another way to manage the connections between hierarchical labels and sheet pins is to use the Sync Sheet Pins tool. Launch this tool using the button in the right toolbar or with Sync Sheet Pins in a sheet symbol’s right click context menu.

同步片别针

此对话框显示每个层级图纸的层级标签和层级图纸图钉。如果该工具是从图纸符号的上下文菜单启动的,则只会显示一个选项卡,其中包含该特定图纸的标签和图钉。如果该工具是全局启动的,例如通过按钮 导入层级标签 24或“放置”“同步图钉”,则会为每个层级图纸显示一个选项卡。

This dialog shows the hierarchical labels and hierarchical sheet pins for each hierarchical sheet. If the tool was launched from the context menu of a sheet symbol, only one tab will be available, with the labels and sheet pins for that specific sheet. If the tool was started globally, i.e. with the button or with PlaceSync Sheet Pins, a tab will be shown for each hierarchical sheet.

每个选项卡中的图标指示图纸符号上的层级引脚是否与图纸内的层级标签正确匹配。如果选项卡中有ercwarn 16图标,则表示图纸中存在一个没有匹配引脚的层级标签,或者一个没有对应层级标签的引脚,或者两者兼有。如果选项卡中有 erc 绿色 16图标,则表示层级标签和层级引脚已正确匹配。如果引脚和标签具有相同的名称和相同的图形形状(输入、输出、双向、三态或被动),则认为它们匹配。

The icon in each tab indicates whether the hierarchical sheet pins on the sheet symbol are correctly matched with the hierarchical labels inside the sheet. If the tab has a icon, then there is a hierarchical label in the sheet without a matching sheet pin, or a sheet pin without a corresponding hierarchical label, or both. If the tab has a icon, then the hierarchical labels and hierarchical sheet pins are matched up correctly. Sheet pins and labels are considered matching if they have the same name and the same graphic shape (input, output, bidirectional, tri-state, or passive).

左侧一列列出了当前图纸中没有对应层级标签的图纸图钉。中间一列列出了当前图纸中没有对应层级图钉的层级标签。右侧一列列出了匹配的图纸图钉和层级标签。每个图钉或标签的名称及其图形形状均会显示。

The column on the left lists sheet pins for the current sheet that do not have a corresponding hierarchical label in the sheet. The middle column lists hierarchical labels in the current sheet that do not have a corresponding hierarchical sheet pin on the sheet symbol. The right column lists pairs of matching sheet pins and hierarchical labels. The name of each pin or label is shown along with its graphic shape.

单击“添加层级标签”按钮,系统将为所选图纸图钉创建新的层级标签,供您按顺序放置在图纸中。选定的图纸图钉将从左侧列中移除,并添加到右侧列,以便与标签匹配。单击“删除图纸图钉”按钮将从图纸符号中删除选定的图纸图钉。

If you click the Add Hierarchical Labels button, new hierarchical labels corresponding to the selected sheet pins will be created for you to place sequentially in the sheet. The selected sheet pins are then removed from the left column and added to to the right column for matching sheet pins and labels. Clicking Delete Sheet Pins will delete the selected sheet pins from the sheet symbol.

单击“添加图纸图钉”按钮,系统将创建与所选层级标签对应的新图纸图钉,供您放置在图纸符号上。然后,层级标签将从中间列移除并添加到右侧列,以便与对应的图纸图钉和标签进行匹配。单击“删除层级标签”将从图纸中删除所选的层级标签。

If you click the Add Sheet Pins button, new sheet pins corresponding to the selected hierarchical labels will be created for you to place on the sheet symbol. The hierarchical labels are then removed from the middle column and added to the right column for matching sheet pins and labels. Clicking Delete Hierarchical Labels will delete the selected hierarchical labels from inside the sheet.

点击该添加层级标签 16按钮会将选定的图纸图钉与层级标签匹配,方法是将图纸图钉重命名为与层级标签名称一致。点击该 添加层级引脚 16按钮则会执行相反的操作,将选定的图纸图钉与层级标签匹配,方法是将层级标签重命名为与图纸图钉名称一致。

Clicking the button will match the selected sheet pin and hierarchical label by renaming the sheet pin to match the hierarchical label’s name. Clicking the button will do the opposite, matching the selected sheet pin and hierarchical label by renaming the label to match the sheet pin.

点击该左16按钮将取消已匹配的元素对,并将图纸图钉和层级标签都移回各自的未匹配列。之后,可以根据需要编辑或重新匹配未匹配的图纸图钉和层级标签。

Clicking the button will unmatch a matched pair, moving both the sheet pin and the hierarchical label back to their respective unmatched columns. The unmatched sheet pin and hierarchical label can then be edited or rematched as desired.

在“同步工作表图钉”对话框中所做的任何更改都会立即生效,甚至在对话框关闭之前就会生效。要取消在“同步工作表图钉”对话框中所做的更改,请使用“撤消”功能。

Any changes made in the Sync Sheet Pins dialog are applied immediately, before the dialog is closed. To cancel a change made in the Sync Sheet Pins dialog, use Undo.

层级式设计示例

Hierarchical design examples

层级式设计可以分为以下几类:

Hierarchical designs can be put into one of several categories:

  • 很简单:每张纸只使用一次。

  • Simple: each sheet is used only once.

  • 复杂:某些工作表被多次实例化。

  • Complex: some sheets are instantiated multiple times.

  • 扁平化:一种简单的层级结构,子层级与其父层级之间没有连接。扁平化层级结构可用于表示非层级式设计。

  • Flat: a sub-case of a simple hierarchy, without connections between subsheets and their parent. Flat hierarchies can be used to represent a non-hierarchical design.

每种层级模型都有其用途;最合适的模型取决于设计需求。

Each hierarchy model can be useful; the most appropriate one depends on the design.

简单的层级结构

Simple hierarchy

KiCad 自带的演示项目就是一个简单的层级结构示例video。根图纸包含七个独立的子图纸,每个子图纸都有层级标签,并且图纸引脚将根图纸中的子图纸彼此连接起来。下面显示了其中两个子图纸的符号。

An example of a simple hierarchy is the video demo project included with KiCad. The root sheet contains seven unique subsheets, each with hierarchical labels and sheet pins linking the sheets to each other in the root sheet. Two of the subsheet symbols are shown below.

视频演示项目中的简单层级结构

复杂层级

Complex Hierarchy

complex_hierarchy演示项目展示了一个复杂的层级结构。根图纸包含两个子图纸符号,它们都指向同一个图纸文件(ampli_ht.kicad_sch)。这使得设计可以包含同一放大器电路的两个副本。尽管这两个图纸符号指向相同的文件名,但它们的图纸名称是唯一的(ampli_ht_verticalampli_ht_horizontal)。在每个子图纸中,电路除了参考标识符之外都完全相同,而参考标识符一如既往地是唯一的。

The complex_hierarchy demo project is an example of a complex hierarchy. The root sheet contains two subsheet symbols, which both refer to the same sheet file (ampli_ht.kicad_sch). This allows the design to include two copies of the same amplifier circuit. Although the two sheet symbols refer to the same filename, the sheet names are unique (ampli_ht_vertical and ampli_ht_horizontal). Inside each subsheet the circuits are identical except for the reference designators, which as always are unique.

本项目不包含任何板级引脚连接。根板与子板之间唯一的连接是使用 电源符号建立的全局电源连接。但是,如果设计需要,复杂层级结构中的板级引脚连接也可以包含在内。

This project contains no sheet pin connections. The only connections between the root sheet and the subsheets are global power connections made with power symbols. However, sheets in a complex hierarchy could include sheet pin connections if appropriate for the design.

来自 complex_hierarchy 演示项目的复杂层级结构

扁平化层级结构

Flat hierarchy

flat_hierarchy演示项目展示了一个扁平化的层级结构。根图包含两个独立的子图符号,没有层级引脚。本项目中的根图仅用于容纳子图,而子图也仅作为原理图中的附加页面使用。

The flat_hierarchy demo project is an example of a flat hierarchy. The root sheet contains two unique subsheet symbols with no hierarchical sheet pins. The root sheet in this project does nothing except hold the subsheets, and the subsheets are used only as additional pages in the schematic.

这是在 KiCad 中创建多页原理图的最简单方法。
来自 flat_hierarchy 演示项目的扁平化层级结构

检查原理图

Inspecting a schematic

查找工具

Find tool

查找工具会在原理图中搜索文本,包括参考标识符、引脚名称、符号字段和图形文本。找到匹配项后,画布会放大并居中显示匹配项,同时高亮显示文本。使用查找图标 顶部工具栏中的按钮启动该工具。

The Find tool searches for text in the schematic, including reference designators, pin names, symbol fields, and graphic text. When the tool finds a match, the canvas is zoomed and centered on the match and the text is highlighted. Launch the tool using the button in the top toolbar.

查找对话框

查找工具有以下几个选项:

The Find tool has several options:

  • 区分大小写:选择搜索是否区分大小写。

  • Match case: Selects whether the search is case-sensitive.

  • 仅匹配完整单词:选中此项后,搜索将仅在原理图中匹配完整的单词。取消选中此项后,如果搜索词是原理图中某个较长单词的一部分,则搜索结果也会匹配。

  • Whole words only: When selected, the search will only match the search term with complete words in the schematic. When unselected, the search will match if the search term is part of a larger word in the schematic.

  • 正则表达式:选中后,可以在搜索词中使用正则表达式。

  • Regular Expression: When selected, regular expressions can be used in the search terms.

  • 搜索密码名称和数字:选择搜索是否应应用于密码名称和数字。

  • Search pin names and numbers: Selects whether the search should apply to pin names and numbers.

  • 搜索网络名称:选择搜索是否应应用于网络名称(标签、符号引脚、图纸引脚和总线成员)。

  • Search net names: Selects whether the search should apply to net names (labels, symbol pins, sheet pins, and bus members).

  • 搜索隐藏字段:选择搜索是否仅应用于可见字段,还是应包括隐藏的符号字段。

  • Search hidden fields: Selects whether the search should apply only to visible fields or if it should include hidden symbol fields.

  • 仅搜索当前图纸:选择是否将搜索范围限制在当前原理图图纸中。

  • Search the current sheet only: Selects whether the search should be limited to the current schematic sheet.

  • 仅搜索当前选择项:选择是否将搜索范围限定为当前选择项。

  • Search the current selection only: Selects whether the search should be limited to the current selection.

此外,还有一个查找和替换工具,可以通过 查找和替换图标顶部工具栏中的按钮激活。该工具的功能与查找工具相同,但还可以将部分或全部匹配项替换为其他文本。

There is also a Find and Replace tool which is activated with the button in the top toolbar. This tool behaves the same as the Find tool, but additionally can replace some or all matches with different text.

查找和替换对话框

查找和替换工具的选项与查找工具相同,但多了一个选项:

The Find and Replace tool has the same options as the Find tool, with one addition:

  • 替换引用指示符中的匹配项:选中此项后,如果引用指示符包含匹配文本,则会对其进行修改。否则,引用指示符将不受影响。

  • Replace matches in reference designators: When selected, reference designators will be modified if they contain matching text. Otherwise reference designators will not be affected.

搜索面板

Search panel

搜索面板是一个停靠面板,其中列出了原理图中的符号、文本和标签信息。您可以通过“视图”“面板”“搜索”来显示或隐藏搜索面板,也可以使用快捷键Ctrl“+G ”。

The search panel is a docked panel that lists information about symbols, text, and labels from the schematic. Show or hide the search panel with ViewPanelsSearch or use the Ctrl+G shortcut.

搜索面板

您可以选择根据搜索字符串筛选列表。如果不使用筛选条件,设计中的所有项目都会列在相应的选项卡中。列出的项目涵盖整个原理图,而不仅仅是当前图纸中的项目。项目会根据其属性进行筛选:

You can optionally filter the list based on a search string. When no filter is used, all items in the design are listed in the corresponding tab. Items from the entire schematic are listed, not just items in the current sheet. Items are filtered based on their properties:

  • 符号和权力符号会根据其字段内容进行筛选。您可以通过启用 菜单中的“搜索隐藏字段”选项来选择是否搜索隐藏字段。配置 16

  • Symbols and power symbols are filtered by the contents of their fields. You can select whether to search hidden fields by enabling the Search Hidden Fields option in the menu

  • 文本(文本和文本框)按文本内容进行过滤

  • Text (text and textboxes) is filtered by the text content

  • 标签按网络名称筛选

  • Labels are filtered by their netnames

您可以点击特定列标题,按该列的值升序或降序对筛选结果进行排序。

You can sort the filtered results in ascending or descending order of the value in a particular column by clicking on that column header.

过滤器支持通配符:*可以匹配任意字符,也?可以匹配任意单个字符。您还可以使用 正则表达式,例如/symbol value/

Filters support wildcards: * matches any characters, and ? matches any single character. You can also use regular expressions, such as /symbol value/.

显示的信息取决于商品类型:

The displayed information depends on the item type:

  • 所有项目均列出其名称和/或值、页码以及在表格中的 X/Y 坐标位置。

  • All items list their name and/or value, page number, and X/Y location in the sheet

  • 符号还会列出其参考标识符、封装和属性(排除在仿真之外、排除在物料清单之外、排除在电路板之外、不填充元件)。

  • Symbols additionally list their reference designator, footprint and attributes (Exclude from Simulation, Exclude from BOM, Exclude from Board, and Do Not Populate)

  • 电源符号还会列出其参考标识符

  • Power symbols additionally list their reference designator

  • 文本和标签还会列出它们的类型,例如文本框或层级结构。

  • Text and labels additionally list their type, e.g. textbox or hierarchical

当您在搜索面板中单击某个项目时,原理图编辑器会切换到该项目的原理图页面,并在编辑画布中选中该项目。根据菜单中的配置配置 16,原理图编辑器还会平移和/或缩放编辑画布中的选中项目。双击搜索面板中的项目会打开其属性对话框。

When you click an item in the search panel, the schematic editor switches to the item’s schematic sheet, and the item is selected in the editing canvas. Depending on what is configured in the menu, the schematic editor will also pan and/or zoom to the selected item in the editing canvas. Double-clicking an item in the search panel opens its properties dialog.

网络高亮显示

Net highlighting

在原理图编辑器中,可以高亮显示电路网络,以便查看其在原理图中出现的所有位置。可以在原理图编辑器中激活网络高亮显示功能,也可以在启用交叉探针高亮显示功能后,在PCB编辑器中高亮显示相应的网络(见下文)。激活网络高亮显示后,高亮显示的网络将以不同的颜色显示。默认情况下,此颜色为粉色,但可以在“首选项”对话框的“颜色”部分进行配置。

An electrical net can be highlighted in the schematic editor to visualize all of the places it appears in the schematic. Net highlighting can be activated in the Schematic Editor or by highlighting the corresponding net in the PCB editor when cross-probe highlighting is enabled (see below). When net highlighting is active, the highlighted net will be shown in a different color. By default this color is pink, but it is configurable in the Color section of the Preferences dialog.

您可以使用右侧工具栏中的“高亮显示网络”工具()点击导线或引脚来高亮显示网络网络高亮图标。或者,您也可以使用“高亮显示网络”快捷键(`)来高亮显示光标下的网络。

Nets can be highlighted by clicking on a wire or pin using the Highlight Net tool in the right toolbar (). Alternatively, the Highlight Net hotkey (`) highlights the net under the cursor.

可以使用“清除网络高亮”操作(快捷键 ~)或在原理图中的空白区域使用“高亮网络”工具来清除网络高亮。默认情况下,也会清除网络高亮,但可以根据需要在“首选项”“原理图编辑器”“编辑选项”Esc中禁用此功能。

Net highlighting can be cleared by using the Clear Net Highlight action (hotkey ~) or by using the Highlight net tool on an empty region in the schematic. By default, Esc also clears net highlighting, but this can be disabled if desired in PreferencesSchematic EditorEditing Options.

网络导航员

Net navigator

网络导航器是一个停靠面板,用于显示原理图中每个高亮显示网络的位置。可以通过 “视图”“面板”“网络导航器”来显示或隐藏网络导航器。

The net navigator is a docked panel that shows the location of every occurrence of a highlighted net in a schematic. Show or hide the net navigator with ViewPanelsNet Navigator.

网络导航器

在原理图中选中某个网络后,该网络在原理图中出现的所有位置都会显示在网络导航面板中。所有与该网络连接的标签、符号引脚和图纸引脚都会列出。每个位置都按其对应的原理图图纸排序。单击某个位置即可在编辑画布中显示该项。

When you highlight a net in the schematic, every place where that net is shown in the schematic is listed in the net navigator panel. All labels, symbol pins, and sheet pins connected to the net are listed. Each occurrence is sorted under its schematic sheet. Clicking on an occurrence displays that item in the editing canvas.

如果没有高亮显示任何网络,网络导航器将显示原理图中所有网络的此信息。

When no net is highlighted, the net navigator displays this information for all nets in the schematic.

网络导航器显示的是高亮显示的网络,而不是选定的网络。

打开网络导航器并选中一个网络后,您可以通过在原理图画布中选择选中网络上的某个项目,然后按 Tab/ Shift+Tab键来快速选择该网络上的各种项目(网络标签、图纸引脚和符号引脚)。按 /Tab 选择网络上的下一个项目,按Shift+Tab选择网络上的上一个项目。

With the net navigator open and a net highlighted, you can quickly select various items on that net (net labels, sheet pins, and symbol pins) by selecting one of the items on the highlighted net in the schematic canvas and pressing Tab/Shift+Tab to cycle through the net items. Pressing Tab selects the next item on the net, while Shift+Tab selects the previous item.

从PCB进行交叉探测

Cross-probing from the PCB

KiCad允许在原理图和PCB之间进行双向交叉探测。交叉探测有几种不同的类型。

KiCad allows bi-directional cross-probing between the schematic and the PCB. There are several different types of cross-probing.

选择交叉探测功能允许您在原理图中选择一个符号或引脚,然后在PCB上选择对应的封装或焊盘(如果存在),反之亦然。默认情况下,交叉探测会将显示内容居中显示在被探测到的元件上,并自动缩放以适应其大小。您可以在“首选项”对话框的“显示选项”部分禁用居中和缩放功能,或者完全禁用选择交叉探测。即使禁用了选择交叉探测,您仍然可以通过右键单击对象并选择“在PCB上选择”来手动从原理图交叉探测到PCB ,或者通过右键单击对象并选择“选择” “在原理图上选择”来从PCB交叉探测到原理图。

Selection cross-probing allows you to select a symbol or pin in the schematic to select the corresponding footprint or pad in the PCB (if one exists) and vice-versa. By default, cross-probing will result in the display centering on the cross-probed item and zooming to fit. You can disable the centering and zooming behavior, or disable selection cross-probing entirely, in the Display Options section of the Preferences dialog. Even when selection cross-probing is disabled, you can manually cross-probe from the schematic to the PCB by right-clicking an object and selecting Select on PCB, or from the PCB to the schematic by right-clicking an object and choosing *SelectSelect on Schematic*.

高亮交叉探测功能允许您同时在原理图和PCB中高亮显示网络。如果在“首选项”对话框的“显示选项”部分启用了“高亮显示交叉探测网络”选项,则在原理图编辑器中高亮显示网络或总线将导致PCB编辑器中相应的网络高亮显示,反之亦然。

Highlight cross-probing allows you to highlight a net in the schematic and PCB at the same time. If the option "Highlight cross-probed nets" is enabled in the Display Options section of the Preferences dialog, highlighting a net or bus in the schematic editor will cause the corresponding net or nets to be highlighted in the PCB editor, and vice versa.

电气规则检查

Electrical rules checking

电气规则检查器 (ERC) 工具会检查原理图中的某些错误,例如未连接的引脚、未连接的层级符号、短路的输出或其他非法连接等。ERC 违规行为会根据检测到的问题的严重程度报告为错误或警告。

The Electrical Rules Checker (ERC) tool checks for certain errors in your schematic, such as unconnected pins, unconnected hierarchical symbols, shorted outputs or other illegal connections, etc. ERC violations are reported as errors or warnings depending on the severity of the issue detected.

ERC并非完美无缺,无法检测出所有错误,但它可以检测到许多常见问题和疏漏。所有检测到的问题都应在继续操作前进行检查和解决。ERC的质量与符号创建过程中声明引脚电气属性的准确性直接相关。如果符号设计不正确,ERC将无法报告准确的信息。

ERC is imperfect and cannot detect all errors, but it can detect many common issues and oversights. All detected issues should be checked and addressed before proceeding. The quality of the ERC is directly related to the care taken in declaring electrical pin properties during symbol creation. If symbols are designed incorrectly, ERC will not report accurate information.

可以通过点击 ERC图标顶部工具栏中的按钮,然后点击“运行 ERC”按钮来启动 ERC。

ERC can be started by clicking on the button in the top toolbar and clicking the Run ERC button.

ERC 对话

所有警告或错误都会在“违规”选项卡中报告,并且每个违规都会在原理图中放置标记,指向原理图的相应部分。警告用黄色箭头表示,错误用红色箭头表示。已排除的违规显示为绿色箭头。已忽略的测试列表显示在“忽略的测试”选项卡中。运行 DRC 后,可以使用“保存…”按钮创建纯文本格式的报告文件。

Any warnings or errors are reported in the Violations tab, and markers for each violation are placed in the schematic so that they point to the relevant part of the schematic. Warnings are indicated by yellow arrows, and errors have red arrows. Excluded violations are shown as green arrows. A list of the ignored tests are shown in the Ignored Tests tab. A report file in plain text format can be created after running DRC using the Save…​ button.

在 ERC 窗口中选择违规项,即可跳转到原理图中选定的违规标记处。

窗口底部显示的数字代表错误、警告和排除项的数量。可以使用相应的复选框从列表中筛选每种类型的违规项。单击“删除标记”将清除选定的违规项,直到下次运行 ERC;单击“删除所有标记”将清除所有违规项,直到下次运行 ERC。

The numbers at the bottom of the window show the number of errors, warnings, and exclusions. Each type of violation can be filtered from the list using the respective checkboxes. Clicking Delete Marker will clear the selected violation until ERC is run again, while clicking Delete All Markers will clear all violations until the next ERC run.

在对话框中右键单击违规项,即可忽略它们或更改其严重程度:

Violations can be right-clicked in the dialog to ignore them or change their severity:

忽略 ERC 警告
  • 排除此违规:忽略此特定违规,但不影响任何其他违规。您可以右键单击已排除的违规,然后选择“移除此违规的排除”来取消排除

  • Exclude this violation: ignores this particular violation, but does not affect any other violations. You can un-exclude a violation by right clicking the excluded violation and selecting Remove exclusion for this violation.

  • 排除并附上注释…:与“排除此违规”功能相同,但会提示您添加注释以解释排除原因。取消隐藏已排除的违规(使用“排除”复选框)后,排除注释会与相应的已排除违规一起显示。要编辑现有排除注释或向现有排除项添加注释,请右键单击已排除的违规,然后选择“编辑排除注释…”

  • Exclude with comment…​: the same as Exclude this violation, but prompts for a comment explaining the reason for the exclusion. When excluded violations are unhidden (using the Exclusions checkbox), exclusion comments are shown with the corresponding excluded violation. To edit an existing exclusion comment or add a comment to an existing exclusion, right click an excluded violation and select Edit exclusion comment…​.

  • 更改严重性:将违规类型从警告更改为错误,或从错误更改为警告。这将影响给定类型的所有违规。

  • Change severity: changes a type of violation from warning to error, or error to warning. This affects all violations of a given type.

  • 全部忽略:忽略给定类型的所有违规。此测试现在将显示在“已忽略的测试”选项卡中,而不是“违规”选项卡中。您可以通过右键单击“已忽略的测试”选项卡中的测试,或在“原理设置”的“违规严重性”面板中 右键单击该测试,来取消忽略 该测试。

  • Ignore all: ignores all violations of a given type. This test will now appear in the Ignored Tests tab rather than the Violations tab. You can un-ignore the test again by right clicking the test in the Ignored Tests tab, or in the Violation Severity panel in Schematic Setup.

  • 编辑违规严重性…:打开原理图设置中的“违规严重性”面板 ,用于编辑所有 DRC 违规类型的严重性。

  • Edit violation severities…​: opens the Violation Severity panel in Schematic Setup, for editing the severities of all DRC violation types.

您还可以使用“检查”“排除标记”排除选定的标记,并使用“视图”菜单显示或隐藏每类标记(错误、警告和排除)。

You can also exclude the selected marker with InspectExclude Marker, and show or hide each category of marker (errors, warnings, and exclusions) with the View menu.

设计规则检查器会在下次运行之间记住已排除和已忽略的违规项。除非选中“排除”复选框,否则已排除的违规项将处于隐藏状态。已忽略的违规项不会显示,但“已忽略的测试”选项卡中会列出已忽略的测试项。

Excluded and ignored violations are remembered between runs of the design rule checker. Excluded violations are hidden unless the Exclusions checkbox is enabled. Ignored violations are not shown, but there is a list of ignored tests in the Ignored Tests tab.

ERC示例

ERC example

ERC指针

上面的截图中有三个错误。

There are three errors in the screenshot above.

  • 两个输出端口已连接在一起(右侧红色箭头所示)。

  • Two outputs have been connected together (red arrow at right).

  • 有两个输入端未连接(左侧红色箭头所示)。实际上,每个引脚都存在两个错误:每个引脚都未连接,并且每个引脚都是输入引脚但没有输出引脚驱动。

  • Two inputs have been left unconnected (red arrows at left). This is actually two errors per pin: each pin is unconnected, and each pin is an input pin that is not driven by an output pin.

选择 ERC 标记后,会在窗口底部的消息窗格中显示违规描述。

Selecting an ERC marker displays a description of the violation in the message pane at the bottom of the window.

消息窗格中的 ERC 违规描述

每个网的ERC标记

Per-net ERC markers

有些违规情况每个网络只报告一次。例如,“输入电源引脚未被任何输出电源引脚驱动”错误实际上适用于未驱动网络上的每个输入电源引脚,但每个网络只显示一个标记。这是为了避免因单一根本原因而产生大量标记。在这种情况下,标记在原理图中的具体位置是任意的,并不一定代表解决问题的最佳位置。

Some violations are reported only once per net. For example, the "Input Power pin not driven by any Output Power pins" error technically applies to each Input Power pin on an un-driven net, but only one marker is shown per net. This is to avoid producing a large number of markers for a single root cause. In this case, exactly where the marker is placed in the schematic is arbitrary and does not necessarily indicate the ideal location for fixing the issue.

在下面的示例中,有四个未驱动的输入电源引脚(每个电源符号对应一个引脚),但只有两个 ERC 标记。添加两个PWR_FLAG符号,分别对应每个未驱动的网络,即可消除错误。符号的“正确”位置PWR_FLAG 取决于原理图,可能不在标记所在的特定电源符号附近,甚至可能不在同一张原理图上。

In the example below, there are four un-driven Input Power pins (one per power symbol), but only two ERC markers. Adding two PWR_FLAG symbols, one to each un-driven net, will clear the errors. The "correct" location for the PWR_FLAG symbol depends on the schematic and may not be near the particular power symbol where the marker was placed, or even in the same schematic sheet.

同一网络上多次违规行为使用同一个标记

电源引脚和电源标志

Power pins and power flags

电源引脚上出现“输入电源引脚未由任何输出电源引脚驱动”错误的情况很常见,如下例所示,即使电源引脚看起来已正确连接到电源轨。这种情况通常发生在电源通过未标记为电源输出的连接器或其他组件供电的设计中。在这种情况下,ERC 检测不到任何连接到网络的输出电源引脚,并会判定输入电源引脚未由电源驱动。

It is common to have an "Input Power pin not driven by any Output Power pins" error on power pins, as shown in the example below, even though the power pins seem to be properly connected to a power rail. This happens in designs where the power is provided through connectors or other components that are not marked as power outputs. In these cases ERC won’t detect any Output Power pins connected to the net and will determine the Input Power pin is not driven by a power source.

例如,在下面的原理图中,VCCGND连接到带有被动引脚的连接器,因此 的输入电源引脚U1不被视为由电源驱动。

For example, in the below schematic, VCC and GND are connected to a connector with passive pins, so the Input Power pins of U1 are not considered driven by a power source.

电源引脚和错误标志

为避免此警告,请将网络连接到PWR_FLAG电源网络上的符号,如下例所示。该PWR_FLAG符号可在符号库中找到power 。或者,您可以将任意输出电源引脚连接到该网络; 该符号PWR_FLAG本身就是一个带有单个输出电源引脚的符号。

To avoid this warning, connect the net to PWR_FLAG symbol on such a power net as shown in the following example. The PWR_FLAG symbol is found in the power symbol library. Alternatively, connect any Output Power pin to the net; PWR_FLAG is simply a symbol with a single Output Power pin.

带 PWR_FLAGs 的电源引脚

即使电源轨不需要接地,通常也需要手动添加接地网络PWR_FLAG,因为稳压器的输出被声明为“输出功率”,但其接地引脚通常被标记为“电源输入”。因此,这些稳压器不被视为驱动接地。这样做是为了防止多个稳压器共享公共接地,避免因两个“输出功率”引脚连接在一起而导致的错误。

Ground nets often need a PWR_FLAG to be manually added, even when power rails do not, because voltage regulators have outputs declared as Output Power, but their ground pins are typically marked as Power Inputs. Therefore grounds are not considered driven by these voltage regulators. This is so multiple regulators can share a common ground without errors caused by two Output Power pins being connected together.

电源网络不会“跳跃”穿过元件,因此,像无源在线滤波元件这样的元件可能需要PWR_FLAG在其下游侧进行指示,以表明该网络仍然连接到电源。

Power nets do not "jump" across components, so, components like passive inline filtering elements may need a PWR_FLAG on their downstream side to indicate that the net is still connected to a power source.

在下面的原理图中,虽然连接到连接器(和)PWR_FLAG的网络上有一个,但还需要一个来将每个和标记为电源网络,因为滤波器只有被动引脚。VCC_INGND_INPWR_FLAGVCCGNDFL1

In the below schematic, although there is a PWR_FLAG on the nets connected to the connectors (VCC_IN and GND_IN), a PWR_FLAG is also needed to mark each of VCC and GND as power nets, because the filter FL1 has only Passive pins.

滤波器两侧的电源引脚均带有 PWR_FLAG 标志

VCC_IN如果“ and”网络连接到带有输出电源引脚的符号,也会出现这种情况GND_IN。实际上,在此原理图中,“and”PWR_FLAG 符号是关闭的VCC_IN,并且GND_IN是不需要的,因为这些网络上没有输入电源引脚。

This would be the case also if the VCC_IN and GND_IN nets were connected to a symbol with Output Power pins. In fact, in this schematic, the PWR_FLAG symbols are on VCC_IN and GND_IN are not required, as there are no Input Power pins on those nets.

有关电源引脚和电源标志的更多信息,请参阅 PWR_FLAG文档

For more information about power pins and power flags, see the PWR_FLAG documentation.

ERC配置

ERC Configuration

原理图设置中的“违规严重性”面板允许您配置应将哪些类型的 ERC 消息报告为错误、警告或忽略。

The Violation Severity panel in Schematic Setup lets you configure what types of ERC messages should be reported as Errors, Warnings, or ignored.

ERC严重性设置示意图

原理图设置中的“引脚冲突映射”面板允许您配置连接规则,以根据相互连接的引脚类型定义错误和警告的电气条件。例如,默认情况下,当一个输出引脚连接到另一个输出引脚时会产生错误。

The Pin Conflicts Map panel in Schematic Setup allows you to configure connectivity rules to define electrical conditions for errors and warnings based on what types of pins are connected to each other. For example, by default an error is produced when an output pin is connected to another output pin.

原理图 ERC 引脚冲突图

点击矩阵中所需的方格即可更改规则,使其在以下选项之间循环切换:允许、警告、错误。

Rules can be changed by clicking on the desired square of the matrix, causing it to cycle through the choices: allowed, warning, error.

ERC 检查列表

List of ERC checks

下表列出了 KiCad 检查的电气规则以及每项检查的默认违规严重程度。所有严重程度均可配置。

The table below lists the electrical rules that KiCad checks and the default violation severity for each check. All severities are configurable.

连接 ERC 检查

这些 ERC 检查旨在查找原理图中的电线和标签连接问题。

These ERC checks look for issues with wire and label connections in the schematic.

违反 描述 默认严重性

引脚未连接

Pin not connected

当符号引脚未连接到网络时,就会发生此违规行为,除非该引脚具有未连接标志或电气类型为“未连接”。

This violation occurs when a symbol pin is not connected to a net, unless the pin has a no-connect flag or has electrical type Unconnected.

错误

Error

输入引脚未由任何输出引脚驱动。

Input pin not driven by any Output pins

当输入类型的符号引脚未连接到驱动引脚时,就会发生此违规。驱动引脚是指输出、双向、三态、电源输出或被动引脚。

This violation occurs when a symbol pin with electrical type Input is not connected to a driving pin. Driving pins are pins with the type output, bidirectional, tristate, power output, or passive pins.

错误

Error

输入电源引脚未被任何输出电源引脚驱动。

Input Power pin not driven by any Output Power pins

当电气类型为“输入电源”的符号引脚未连接到“输出电源”引脚时,就会发生此违规行为。 上述已描述了此违规行为的常见原因。

This violation occurs when a symbol pin with electrical type Input Power is not connected to an Output Power pin. A common cause of this violation is described above.

错误

Error

带有“未连接”标志的引脚已连接

A pin with a "no connection" flag is connected

当带有“无连接”标志的符号引脚连接到网络时,就会发生违规 。

The violation occurs when a symbol pin with a no connection flag is connected to a net.

警告

Warning

未连接“无连接”标志

Unconnected "no connection" flag

当“无连接”标志 未连接到引脚或标签时,就会发生此违规行为。

This violation occurs when a No connection flag is not connected to a pin or label.

警告

Warning

标签未连接到任何内容

Label not connected to anything

当全局标签、层级标签、局部标签或指令标签未连接到引脚或其他标签时,就会发生此违规行为。

This violation occurs when a global, hierarchical, local, or directive label is not connected to a pin or another label.

错误

Error

原理图中未连接全局标签。

Global label not connected anywhere else in the schematic

当具有全局标签的网络上的符号引脚少于两个时,就会发生这种违规行为(如果引脚少于两个,则该标签不会用于连接任何内容,因为它只连接到一个符号引脚)。

This violation occurs when there are fewer than two symbol pins on a net with a global label (if there are fewer than two pins, then the label isn’t being used to connect anything as it is only connected to a single symbol pin).

警告

Warning

全局标签在示意图中仅出现一次。

Global label only appears once in the schematic

当全局标签在原理图中仅出现一次时,就会发生此违规,这意味着该标签没有形成任何全局连接。默认情况下会忽略此违规,以允许用户使用全局标签来标记网络,即使该网络没有连接到其他任何地方。

This violation occurs when a global label only appears once in the schematic, meaning that the label is not forming any global connections. This violation is ignored by default to allow users to use global labels to label nets, even if the net does not connect anywhere else.

忽略

Ignore

本地标签和全局标签名称相同。

Local and global labels have the same name

当本地标签与全局标签名称相同时,就会发生此违规。如果这些标签位于不同的图纸上,它们将无法连接,即使它们原本应该连接在一起。请注意,虽然名称相同的本地标签和全局标签在不同的图纸上无法连接,但在相同的图纸上则可以连接。

This violation occurs when a local label has the same name as a global label. If these labels are on separate sheets, they will not connect, although they may have been intended to connect. Note that while a local label and a global label with the same name won’t connect if they are on different sheets, they will connect if they are on the same sheet.

警告

Warning

电线未连接到任何东西

Wires not connected to anything

当电线未连接到任何引脚或标签时,就会发生这种违规行为。

This violation occurs when a wire is not connected to any pin or label.

错误

Error

需要乘车

Bus Entry needed

此违规仅适用于从 EAGLE 项目导入的项目。它表示导入程序无法自动向导入的原理图添加总线条目,因此您必须手动添加。

This violation only applies to projects imported from EAGLE projects. It indicates places where the importer was unable to automatically add bus entries to the imported schematic, so you must add them by hand.

错误

Error

连接网格上的符号引脚或线端

Symbol pin or wire end off connection grid

当符号引脚或导线末端未与连接网格对齐时,就会发生此违规。符号引脚和导线末端必须与网格对齐才能相互连接。用于此检查的网格由“原理图设置”“格式”“连接网格”中的 “连接网格”设置定义。

This violation occurs when a symbol pin or wire end is not aligned to the connection grid. Symbol pins and wire ends need to be aligned to the grid in order to connect to each other. The grid used for this check is defined by the connection grid setting in Schematic SetupFormattingConnection grid.

警告

Warning

四个连接点连接在一起

Four connection points are joined together

当电线以四路(十字)连接方式连接时,就会发生这种违规行为。此类连接有时被认为有害,因为很难确定所有四根电线是否都打算连接在一起,或者其中两根电线是否原本就打算交叉而不形成连接点。

This violation occurs when wires join in a four-way (cross) junction. Such junctions are sometimes considered harmful because it can be unclear if all four wires are intended to be joined or if two wires were intended to cross without a junction.

忽略

Ignore

多个引脚具有相同的引脚编号

Multiple pins with the same pin number

当同一符号中的两个引脚具有相同的引脚编号时,就会发生此违规行为。符号内的引脚必须具有唯一的编号,因此这种违规行为始终属于错误。

This violation occurs when two pins in the same symbol have the same pin number. Symbol pins must be uniquely numbered within a symbol, and therefore this violation is always an error.

错误(不可配置)

Error (not configurable)

标签连接多根电线

Label connects more than one wire

当标签锚点连接到两根导线上(两根导线交叉但未连接)时,就会发生这种违规情况。在这种情况下,无法确定标签应该连接到哪个网络。

This violation occurs when a label anchor connects to two wires (where two wires cross without connecting). In this situation is not possible to determine which net the label should connect to.

警告

Warning

未连接的电线末端

Unconnected wire endpoint

当线路端点未连接到任何物体时,就会发生这种违规行为。

This violation occurs when a wire endpoint is not connected to anything.

警告

Warning

冲突 ERC 检查

这些 ERC 检查会查找符号、表格和总线中的冲突信息。

These ERC checks look for conflicting information in symbols, sheets, and buses.

违反 描述 默认严重性

重复的参考标识符

Duplicate reference designators

当两个符号具有相同的参考指示符时,就会发生这种违规行为。

This violation occurs when two symbols have the same reference designator.

错误

Error

相同符号的单位具有不同的值

Units of same symbol have different values

当同一个符号的不同单元具有不同的值时,就会发生这种违规行为。

This violation occurs when units of a single symbol have different values.

错误

Error

符号的另一个单元中分配了不同的足迹

Different footprint assigned in another unit of the symbol

当同一个符号的不同单元被赋予不同的封装时,就会发生这种违规行为。

This violation occurs when units of a single symbol have different assigned footprints.

错误

Error

符号的另一个单元中,分配给共享引脚的不同网络

Different net assigned to a shared pin in another unit of the symbol

当符号的多个单元共用的引脚在每个单元中没有连接到同一网络时,就会发生这种违规行为。

This violation occurs when a pin that is shared between multiple units of a symbol is not connected to the same net in each unit.

错误

Error

给定工作表中的重复工作表名称

Duplicate sheet names within a given sheet

当同一个父工作表中的两个子工作表具有相同的名称时,就会发生这种违规行为。

This violation occurs when two hierarchical sheets in the same parent sheet have the same name.

错误

Error

层级标签与图纸图钉不匹配

Mismatch between hierarchical labels and sheet pins

当父工作表中的层级标签没有对应的层级工作表图钉,或者子工作表中的层级工作表图钉没有对应的层级标签时,就会发生此违规行为。

This violation occurs when a hierarchical label does not have a corresponding hierarchical sheet pin in the parent sheet, or a hierarchical sheet pin does not have a corresponding hierarchical label in the child sheet.

错误

Error

这辆巴士或网有不止一个名字。

More than one name given given to this bus or net

当一个网络附加了多个标签时,就会发生这种违规行为。网络只能有一个名称,因此如果一个网络附加了多个标签,系统会选择其中一个名称作为规范名称。

This violation occurs when a net has multiple labels attached. Nets can only have a single name, so if multiple labels are attached to a net, one name will be selected and used as the canonical name.

警告

Warning

原理图上总线别名定义存在冲突

Conflict between bus alias definitions across schematic sheets

当总线别名在不同的工作表中具有不同的成员时,就会发生此违规。如果多个工作表中使用相同的总线别名,则每个工作表中该别名的成员必须相同。

This violation occurs when a bus alias has different members in different sheets. If the same bus alias name is used in multiple sheets, the members of the alias must be the same for each sheet.

错误

Error

公交车在图形上相连,但车上没有共同的乘客。

Buses are graphically connected but share no bus members

当图形上连接的公交车没有共同的公交车成员时,就会发生这种违规行为。

This violation occurs when buses that are graphically connected do not have bus members in common.

错误

Error

总线和网件之间的连接无效

Invalid connection between bus and net items

当总线连接到网络元素(例如导线、指向单个网络的标签或指向单个网络的图钉)时,就会发生此违规行为。标签和图钉只有在指向总线而非单个信号时才能连接到总线。

This violation occurs when a bus is connected to a net item, such as a wire, a label referring to a single net, or a sheet pin referring to a single net. Labels and sheet pins can only be connected to buses if they refer to buses rather than individual signals.

错误

Error

网络在图形上与总线相连,但并非总线成员。

Net is graphically connected to a bus but not a bus member

当一个网络通过总线入口连接到一个总线,但该网络不是该总线的成员时,就会发生这种违规行为。

This violation occurs when a net is connected to a bus with a bus entry but the net is not a member of that bus.

警告

Warning

其他ERC检查

这些 ERC 检查会查找原理图中的其他杂项问题。

These ERC checks look for other miscellaneous issues in the schematic.

违反 描述 默认严重性

该符号未加注释

Symbol is not annotated

当符号没有 用唯一的参考指示符进行注释时,就会发生这种违规行为。

This violation occurs when a symbol is not annotated with a unique reference designator.

错误

Error

未解析的文本变量

Unresolved text variable

当未在原理图设置${variable_name}中定义文本变量()时,就会发生此违规行为。

This violation occurs when a text variable (${variable_name}) is used without being defined in Schematic Setup.

错误

Error

SPICE模型问题

SPICE model issue

当 SPICE 模型存在语法错误或其他问题时,就会发生此违规行为。

This violation occurs when a SPICE model has a syntax error or other problem.

忽略

Ignore

标签相似(仅大小写不同)

Labels are similar (lower/upper case difference only)

当两个标签非常相似,仅个别字母大小写不同时,就会出现这种错误。这可能是由于笔误导致两个本应连接的标签被断开连接。

This violation occurs when two labels are similar and differ only by the case of some letters. This may be a typo causing two labels to be disconnected when they are intended to be connected.

警告

Warning

电源引脚类似(仅大小写不同)

Power pins are similar (lower/upper case difference only)

当两个全局电源引脚驱动的网络名称 相似,仅大小写不同时,就会发生此违规。这可能是由于拼写错误导致两个全局电源引脚本应连接却被断开。

This violation occurs when the net names driven by two global power pins are similar and differ only by the case of some letters. This may be a typo causing two global power pins to be disconnected when they are intended to be connected.

警告

Warning

电源引脚和标签相似(仅大小写不同)

Power pin and label are similar (lower/upper case difference only)

当全局电源引脚驱动的标签和网络名称 相似,仅大小写不同时,就会发生此错误。这可能是由于拼写错误导致两个本应连接的全局电源引脚断开连接。

This violation occurs when a label and the net name driven by a global power pin are similar and differ only by the case of some letters. This may be a typo causing two global power pins to be disconnected when they are intended to be connected.

警告

Warning

库符号问题

Library symbol issue

当检测到以下几种符号库问题之一时,就会发生此违规行为:

This violation occurs when one of several symbol library issues is detected:

  • 符号的符号库未包含在 库表中,也未启用。

  • The symbol library for a symbol is not included and enabled in the library table

  • 原理图中的某个符号在其符号库中不存在。

  • A symbol in the schematic does not exist in its symbol library

警告

Warning

符号与库中的副本不匹配

Symbol doesn’t match copy in library

当原理图中的符号与库中的符号版本不同时,就会发生这种违规行为。

This violation occurs when a symbol in the schematic is different than the library version of the symbol.

您可以使用“比较符号与库”工具 比较原理图符号和库符号,该工具可通过在 ERC 窗口中右键单击违规项来访问。如有需要,您可以更新原理图符号以匹配库符号。

You can compare between the schematic and library versions of the symbol using the Compare Symbol with Library tool, which is available by right clicking the violation in the ERC window. If desired, you can update the schematic symbol to match the library symbol.

警告

Warning

足迹链接问题

Footprint link issue

当检测到以下几种封装分配问题之一时,就会发生此违规行为:

This violation occurs when one of several footprint assignment issues is detected:

  • 符号的封装分配不是有效的封装标识符

  • The footprint assignment for a symbol is not a valid footprint identifier

  • 符号封装分配中指定的封装库未包含在 库表中,也未启用。

  • The footprint library given in a symbol’s footprint assignment is not included and enabled in the library table

  • 分配给某个符号的封装在指定的封装库中不存在。

  • The footprint assigned to a symbol does not exist in the specified footprint library

警告

Warning

分配的封装尺寸与封装尺寸筛选器不匹配。

Assigned footprint doesn’t match footprint filters

当分配给符号的封装与该符号的封装过滤器不匹配时,就会发生此违规。如果符号没有任何封装过滤器,则不会发生违规。

This violation occurs when the footprint assigned to a symbol does not match the symbol’s footprint filters. If the symbol doesn’t have any footprint filters, no violation occurs.

警告

Warning

符号包含的单位数量超过了已定义的单位数量。

Symbol has more units than are defined

当原理图中符号所包含的单位数量超过符号本身定义的单位数量时,就会发生这种违规行为。原理图中的单位必须与符号的定义完全一致。

This violation occurs when a symbol has more units placed in the schematic than are defined in the symbol. Units in the schematic must correspond exactly to the symbol definition.

错误

Error

符号包含未放置的单位

Symbol has units that are not placed

当多单元符号中的某个单元未放置在原理图中时,就会发生此违规行为。未放置的单元将不会连接到任何元件。

This violation occurs when a unit from a multi-unit symbol is not placed in the schematic. Unplaced units will not be connected to anything.

警告

Warning

符号具有未放置的输入引脚

Symbol has input pins that are not placed

当多单元符号的单元具有未放置的输入引脚时,就会发生此违规行为,因此这些输入引脚将不会连接到任何东西。

This violation occurs when a multi-unit symbol has units with input pins that are not placed, so those input pins will not be connected to anything.

警告

Warning

符号具有未放置的双向引脚

Symbol has bidirectional pins that are not placed

当多单元符号具有未放置的双向引脚的单元时,就会发生此违规行为,因此这些输入引脚将不会连接到任何东西。

This violation occurs when a multi-unit symbol has units with bidirectional pins that are not placed, so those input pins will not be connected to anything.

警告

Warning

符号具有未放置的电源输入引脚

Symbol has power input pins that are not placed

当多单元符号中的单元的电源输入引脚未放置到位时,就会发生此违规行为,因此这些输入引脚将不会连接到任何东西。

This violation occurs when a multi-unit symbol has units with power input pins that are not placed, so those input pins will not be connected to anything.

错误

Error

引脚间冲突问题

Conflict problem between pins

当引脚之间的连接不符合引脚冲突映射中允许的连接时,就会发生这种违规行为。

This violation occurs when a connection between pins is not allowed per the allowed connections in the Pin Conflicts Map.

来自图钉冲突图

From Pin Conflicts Map

用户可自定义的ERC违规

User-definable ERC violations

您可以使用特殊的 文本变量手动触发原理图 ERC 警告或错误。这些项目将在 ERC 运行时显示为错误或警告。这有助于标记项目以便后续跟进或审查。

You can manually trigger schematic ERC warnings or errors using special text variables. These items will appear as errors or warnings when ERC runs. This can be useful to flag items for later followup or review.

要触发 ERC 违规,请使用文本变量${ERC_ERROR <violation name>}${ERC_WARNING <violation name>}具体取决于您希望触发错误还是警告。您可以将其放置在文本项、文本框或字段中,包括符号字段、图纸字段和标签字段。ERC 运行时,将生成一个具有指定违规名称的 ERC 违规。这些文本变量在原理图中解析为空字符串,大括号后的任何文本都将包含在 ERC 违规描述中。文本变量必须放置在文本对象的开头才能触发违规。

To cause an ERC violation, use the text variable ${ERC_ERROR <violation name>} or ${ERC_WARNING <violation name>} depending on whether an error or warning is desired. You can place this in a text item, text box, or field, including symbol fields, sheet fields, and label fields. When ERC runs, this will generate a ERC violation with the given violation name. These text variables resolve to an empty string in the schematic, and any text after the braces is included in the ERC violation’s description. The text variable must be placed at the start of the text object in order to trigger a violation.

例如,包含以下内容的文本项${ERC_ERROR TODO}Calculate resistor value 将仅显示为文本“计算电阻值”,并且将生成一个名为“TODO”的 ERC 错误,其描述为“计算电阻值”。

For example, a text item containing ${ERC_ERROR TODO}Calculate resistor value will appear in the board as just the text "Calculate resistor value", and will generate an ERC error named "TODO" with "Calculate resistor value" in the description.

ERC报告文件

ERC report file

点击ERC对话框中的“保存…”按钮,即可生成并保存ERC报告文件。ERC报告文件的文件扩展名为.rpt.erc。下面提供了一个ERC报告文件示例。

An ERC report file can be generated and saved by clicking the Save…​ button in the ERC dialog. The file extension for ERC report files is .rpt. An example ERC report file is given below.

ERC报告(2022年10月21日星期五下午2:07:05 EDT,UTF-8编码)

***** 床单 /
[pin_not_driven]:输入引脚未被任何输出引脚驱动。
    严重性:错误
    @(149.86 mm, 60.96 mm): 符号 U1B [74LS00] 引脚 4 [, 输入, 线路]
[pin_not_connected]: 引脚未连接
    严重性:错误
    @(149.86 mm, 60.96 mm): 符号 U1B [74LS00] 引脚 4 [, 输入, 线路]
[pin_not_connected]: 引脚未连接
    严重性:错误
    @(149.86 mm, 66.04 mm): 符号 U1B [74LS00] 引脚 5 [, 输入, 线路]
[引脚连接]:类型为 Output 和 Output 的引脚已连接
    严重性:错误
    @(165.10 mm, 63.50 mm): 符号 U1B [74LS00] 引脚 6 [, 输出, 反相]
    @(165.10 mm, 46.99 mm): 符号 U1A [74LS00] 引脚 3 [, 输出, 反相]
[pin_not_driven]:输入引脚未被任何输出引脚驱动。
    严重性:错误
    @(149.86 mm, 66.04 mm): 符号 U1B [74LS00] 引脚 5 [, 输入, 线路]

 ** ERC 消息:5 个错误,5 个警告,0 个
ERC report (Fri 21 Oct 2022 02:07:05 PM EDT, Encoding UTF8)

***** Sheet /
[pin_not_driven]: Input pin not driven by any Output pins
    ; Severity: error
    @(149.86 mm, 60.96 mm): Symbol U1B [74LS00] Pin 4 [, Input, Line]
[pin_not_connected]: Pin not connected
    ; Severity: error
    @(149.86 mm, 60.96 mm): Symbol U1B [74LS00] Pin 4 [, Input, Line]
[pin_not_connected]: Pin not connected
    ; Severity: error
    @(149.86 mm, 66.04 mm): Symbol U1B [74LS00] Pin 5 [, Input, Line]
[pin_to_pin]: Pins of type Output and Output are connected
    ; Severity: error
    @(165.10 mm, 63.50 mm): Symbol U1B [74LS00] Pin 6 [, Output, Inverted]
    @(165.10 mm, 46.99 mm): Symbol U1A [74LS00] Pin 3 [, Output, Inverted]
[pin_not_driven]: Input pin not driven by any Output pins
    ; Severity: error
    @(149.86 mm, 66.04 mm): Symbol U1B [74LS00] Pin 5 [, Input, Line]

 ** ERC messages: 5  Errors 5  Warnings 0

分配足迹

Assigning Footprints

在进行PCB布线之前,需要为电路板上每个待组装的元件选择封装。封装定义了物理元件与电路板上布线之间的铜箔连接。

Before routing a PCB, footprints need to be selected for every component that will be assembled on the board. Footprints define the copper connections between physical components and the routed traces on a circuit board.

有些符号带有预先分配的封装,但许多符号有多种可能的封装,因此用户需要选择合适的封装。

Some symbols come with footprints pre-assigned, but for many symbols there are multiple possible footprints, so the user needs to select the appropriate one.

KiCad提供了多种分配封装的方法:

KiCad offers several ways to assign footprints:

  • 符号属性

    • 符号属性对话框

    • 符号字段表

  • Symbol Properties

    • Symbol Properties Dialog

    • Symbol Fields Table

  • 放置符号时

  • While placing symbols

  • 足迹分配工具

  • Footprint Assignment Tool

下面将分别解释每种方法。具体使用哪种方法取决于个人偏好;根据实际情况,某种方法可能更方便。所有这些方法本质上都是将所选封装的名称存储在符号Footprint字段中。

Each method will be explained below. Which to use is a matter of preference; one method may be more convenient depending on the situation. All of these methods are equivalent in that they store the name of the selected footprint in the symbol’s Footprint field.

在分配封装之前,需要先配置封装库表。有关配置封装库表的信息,请参阅 PCB编辑器手册

在符号属性中指定足迹

Assigning Footprints in Symbol Properties

Footprint可以直接在符号的属性窗口中编辑符号的字段。

A symbol’s Footprint field can be edited directly in the symbol’s Properties window.

在符号属性中指定封装

点击字段图书馆图标中的按钮 Footprint即可打开封装选择器,其中会显示按封装库排序的可用封装。

Clicking the button in the Footprint field opens the Footprint Chooser, which shows the available footprints sorted by footprint libraries.

“足迹选择器”会根据您在搜索字段中输入的内容,按名称、描述和关键字以及显示为列的任何字段筛选足迹。*它还支持通配符。足迹搜索的操作方式与符号选择器对话框?中的操作方式相同。

The Footprint Chooser filters footprints by name, description, and keywords, as well as any fields that are shown as columns, according to what you type into the search field. * and ? wildcards are available. The footprint search behaves the same as in the symbol chooser dialog.

如果符号定义了任何封装筛选器,则可以使用“应用封装筛选器”选项来隐藏不符合这些筛选器的封装。如果选中“按引脚数筛选”选项,则只会列出引脚数与符号匹配的封装。您可以单击按钮选择按字母顺序或按最佳匹配对搜索结果进行排序 排序按钮

If the symbol defines any footprint filters, the apply footprint filters option can be used to hide footprints that don’t match those filters. If the filter by pin count option is selected, only footprints that match the symbol’s pincount will be listed. You can choose to sort search results alphabetically or by best match by clicking on the button.

单击封装名称即可选中该封装,并在右侧预览窗格中显示。您可以单击二维组件图标3D组件图标按钮在封装的 2D 和 3D 预览之间切换。双击封装将关闭选择器,并将符号Footprint 字段设置为所选封装。

Single clicking a footprint name selects the footprint and displays it in the preview pane on the right. You can switch between a 2D and 3D preview of the footprint by clicking the and buttons. Double clicking on a footprint closes the chooser and sets the symbol’s Footprint field to the selected footprint.

在足迹选择器中选择足迹

使用符号字段表分配足迹

Assigning Footprints with the Symbol Fields Table

无需单独编辑每个符号的属性,可以使用符号字段表在一个位置查看和编辑设计中所有符号的属性。这包括通过编辑 Footprint每个符号的字段来分配封装。

Rather than editing the properties of each symbol individually, the Symbol Fields Table can be used to view and edit the properties of all symbols in the design in one place. This includes assigning footprints by editing the Footprint field of each symbol.

可以通过“工具”“编辑符号字段…”或通过符号字段表图标 顶部工具栏上的按钮访问符号字段表。

The Symbol Fields Table is accessed with ToolsEdit Symbol Fields…​, or with the button on the top toolbar.

Footprint字段在此处的行为与“符号属性”窗口中的行为相同:可以直接编辑,也可以使用封装库浏览器以可视方式选择封装。

The Footprint field behaves the same here as in the Symbol Properties window: it can be edited directly, or footprints can be selected visually with the Footprint Library Browser.

使用符号字段表批量编辑封装分配

有关符号字段表的更多信息,请参阅 有关编辑符号属性的部分

For more information on the Symbol Fields Table, see the section on editing symbol properties.

放置符号时分配足迹

Assigning Footprints While Placing Symbols

首次将符号添加到原理图时,可以为符号分配封装。

Footprints can be assigned to symbols when the symbol is first added to the schematic.

某些符号定义了默认封装。这些符号添加到原理图时,将预先分配该封装。如果符号具有默认封装,则在选择该符号时,符号选择器对话框中会以图形方式预览封装。对于未定义默认封装的符号,封装下拉菜单将显示“无默认封装”,封装预览画布将显示“未指定封装”。

Some symbols are defined with a default footprint. These symbols will have this footprint preassigned when they are added to the schematic. If a symbol has a default footprint, the footprint will be graphically previewed in the symbol chooser dialog when the symbol is selected. For symbols without a default symbol defined, the footprint dropdown will say "No default footprint", and the footprint preview canvas will say "No footprint specified".

在“添加符号”对话框中使用默认封装

符号可以设置封装过滤器,用于指定哪些封装适合与该符号一起使用。如果为选定的符号定义了封装过滤器,则所有符合过滤器条件的封装都会显示在封装下拉菜单中。选定的封装将显示在预览画布中,并在将符号添加到原理图时分配给该符号。

Symbols can have footprint filters that specify which footprints are appropriate to use with that symbol. If footprint filters are defined for the selected symbol, all footprints that match the footprint filters will appear as options in the footprint dropdown. The selected footprint will be displayed in the preview canvas and will be assigned to the symbol when the symbol is added to the schematic.

只有加载了封装库,封装选项才会显示在封装下拉菜单中。封装库会在会话中首次打开封装编辑器或封装库浏览器时加载。

有关封装过滤器的更多信息,请参阅 符号编辑器文档

For more information on footprint filters, see the Symbol Editor Documentation.

使用足迹分配工具分配足迹

Assigning Footprints with the Footprint Assignment Tool

封装分配工具允许您将原理图中的符号与印刷电路板布局时使用的封装关联起来。它提供封装列表筛选、封装查看和 3D 元件模型查看功能,以帮助确保每个元件都关联到正确的封装。

The Footprint Assignment Tool allows you to associate symbols in your schematic to footprints used when laying out the printed circuit board. It provides footprint list filtering, footprint viewing, and 3D component model viewing to help ensure the correct footprint is associated with each component.

可以通过手动或创建等效文件(.equ 文件)将元件分配到相应的封装上。等效文件是查找表,将每个元件与其封装关联起来。

Components can be assigned to their corresponding footprints manually or automatically by creating equivalence files (.equ files). Equivalence files are lookup tables associating each component with its footprint.

使用“工具”“分配足迹…”运行该工具,或单击 足迹分配工具图标顶部工具栏中的图标。

Run the tool with ToolsAssign Footprints…​, or by clicking the icon in the top toolbar.

足迹分配工具概述

Footprint Assignment Tool Overview

下图显示了足迹分配工具的主窗口。

The image below shows the main window of the Footprint Assignment Tool.

足迹分配工具的主窗口
  • 左侧窗格包含与项目关联的可用封装库列表。

  • The left pane contains the list of available footprint libraries associated with the project.

  • 中间窗格包含原理图中的符号列表。

  • The center pane contains the list of symbols in the schematic.

  • 右侧窗格包含从项目封装库加载的可用封装列表。

  • The right pane contains the list of available footprints loaded from the project footprint libraries.

  • 底部窗格描述了已应用于封装列表的筛选器,并打印了有关最右侧窗格中选定封装的信息。

  • The bottom pane describes the filters that have been applied to the footprint list and prints information about the footprint selected in the rightmost pane.

顶部工具栏包含以下命令:

The top toolbar contains the following commands:

节省 24

将当前封装关联转移到原理图中。

Transfer the current footprint associations to the schematic.

图书馆表格 24

编辑全局和项目占用空间库表。

Edit the global and project footprint library tables.

图标足迹浏览器 24

在封装查看器中查看选定的封装。

View the selected footprint in the footprint viewer.

剩下24

选择上一个没有封装关联的符号。

Select the previous symbol without a footprint association.

右 24

选择下一个没有关联封装的符号。

Select the next symbol without a footprint association.

撤销 24

撤销上次编辑。

Undo last edit.

重做 24

重做最后一次编辑。

Redo last edit.

自动关联 24

使用等效文件执行自动封装关联。

Perform automatic footprint association using an equivalence file.

删除关联 24

删除所有封装分配。

Delete all footprint assignments.

模块筛选列表 24

根据所选符号中定义的封装筛选条件筛选封装列表。

Filter footprint list by footprint filters defined in the selected symbol.

模块引脚筛选列表 24

按所选符号的引脚数筛选封装列表。

Filter footprint list by pin count of the selected symbol.

模块库列表 24

按选定库筛选封装列表。

Filter footprint list by selected library.

下表列出了“封装分配工具”的键盘命令:

The following table lists the keyboard commands for the Footprint Assignment Tool:

右箭头/Tab键

Right Arrow / Tab

激活当前激活窗格右侧的窗格。如果最后一个窗格当前处于激活状态,则循环回到第一个窗格。

Activate the pane to the right of the currently activated pane. Wrap around to the first pane if the last pane is currently activated.

左箭头

Left Arrow

激活当前激活窗格左侧的窗格。如果第一个窗格当前处于激活状态,则循环到最后一个窗格。

Activate the pane to the left of the currently activated pane. Wrap around to the last pane if the first pane is currently activated.

向上箭头

Up Arrow

选择当前选中列表中的上一项。

Select the previous item of the currently selected list.

向下箭头

Down Arrow

选择当前选中列表中的下一个项目。

Select the next item of the currently selected list.

上一页

Page Up

选择当前选中项上方整整一页的项。

Select the item one full page upwards of the currently selected item.

向下翻页

Page Down

选择当前选中项下方整整一页的项。

Select the item one full page downwards of the currently selected item.

Home

选择当前选中列表中的第一项。

Select the first item of the currently selected list.

结尾

End

选择当前选中列表中的最后一项。

Select the last item of the currently selected list.

使用足迹分配工具手动分配足迹

Manually Assigning Footprints with the Footprint Assignment Tool

要手动将封装与元件关联,首先在元件(中间)窗格中选择一个元件。然后,在封装(右侧)窗格中双击所需封装的名称来选择封装。封装将被分配给所选元件,并且下一个尚未分配封装的元件将自动被选中。

To manually associate a footprint with a component, first select a component in the component (middle) pane. Then select a footprint in the footprint (right) pane by double-clicking on the name of the desired footprint. The footprint will be assigned to the selected component, and the next component without an assigned footprint is automatically selected.

如果封装面板中未显示任何封装,请检查 封装筛选选项是否已正确应用。

当所有元件都分配好封装后,单击“确定”按钮保存分配并退出工具。或者,单击“取消”放弃更新后的分配,或单击“应用”、“保存原理图并继续”以保存新的分配而不退出工具。

When all components have footprints assigned to them, click the OK button to save the assignments and exit the tool. Alternatively, click Cancel to discard the updated assignments, or Apply, Save Schematic & Continue to save the new assignments without exiting the tool.

筛选足迹列表

有四个筛选选项,可以限制封装面板中显示的封装类型。这些筛选选项可通过顶部工具栏中的三个按钮和一个文本框启用和禁用。

There are four filtering options which restrict which footprints are displayed in the footprint pane. The filtering options are enabled and disabled with three buttons and a textbox in the top toolbar.

  • 模块筛选列表 24:激活 可在每个符号中定义的过滤器。例如,运算放大器符号可以定义仅显示 SOIC 和 DIP 封装的过滤器。

  • : Activate filters that can be defined in each symbol. For example, an opamp symbol might define filters that show only SOIC and DIP footprints.

  • 模块引脚筛选列表 24:仅显示与所选符号引脚数匹配的封装。

  • : Only show footprints that match the selected symbol’s pin count.

  • 模块库列表 24:仅显示左侧窗格中选择的库中的封装。

  • : Only show footprints from the library selected in the left pane.

  • 在文本框中输入文本会隐藏与文本不匹配的足迹。当文本框为空时,此筛选器将失效。

  • Entering text in the textbox hides footprints that do not match the text. This filter is disabled when the box is empty.

当所有筛选条件都禁用时,将显示完整的封装列表。

When all filters are disabled, the full footprint list is shown.

窗口底部窗格会显示已应用的筛选器及其符合所选筛选条件的封装数量。例如,当启用元件的封装筛选器和引脚数筛选器时,底部窗格会显示封装筛选器和引脚数:

The applied filters are described in the bottom pane of the window, along with the number of footprints that meet the selected filters. For example, when the symbol’s footprint filters and pin count filters are enabled, the bottom pane prints the footprint filters and pin count:

启用符号封装过滤器和引脚计数过滤器时,筛选详细信息

在封装面板中,可以同时使用多个过滤器来缩小可能适用的封装列表范围。KiCad 标准库中的符号定义了封装过滤器,这些过滤器旨在与引脚数过滤器结合使用。

Multiple filters can be used at once to help narrow down the list of possibly appropriate footprints in the footprint pane. The symbols in KiCad’s standard library define footprint filters that are designed to be used in combination with the pin count filter.

使用足迹分配工具自动分配足迹

Automatically Assigning Footprints with the Footprint Assignment Tool

封装分配工具允许您将封装分配存储在外部文件中,并在以后加载这些分配,即使是在不同的项目中。这样,您可以自动将符号与相应的封装关联起来。

The Footprint Assignment Tool allows you to store footprint assignments in an external file and load the assignments later, even in a different project. This allows you to automatically associate symbols with the appropriate footprints.

外部文件称为等效文件,它存储了符号值到相应封装的映射关系。等效文件通常使用.equivalence.equ文件扩展名。等效文件是语法简单的纯文本文件,必须由用户使用文本编辑器创建。语法说明如下。

The external file is referred to as an equivalence file, and it stores a mapping of a symbol value to a corresponding footprint. Equivalence files typically use the .equ file extension. Equivalence files are plain text files with a simple syntax, and must be created by the user using a text editor. The syntax is described below.

您可以通过在“封装分配工具”中单击“首选项”“管理封装关联文件”来选择要使用的等效文件。

You can select which equivalence files to use by clicking PreferencesManage Footprint Association Files in the Footprint Assignment Tool.

管理等效文件
  • 点击“添加”按钮,添加新的等效文件。

  • Add new equivalence files by clicking the Add button.

  • 单击“删除”按钮,删除选定的等效文件。

  • Remove the selected equivalence file by clicking the Remove button.

  • 点击“上移”“下移”按钮,即可更改等效文件的优先级。如果某个符号的值在多个等效文件中找到,则最后一个匹配的等效文件中的封装将覆盖之前的等效文件。

  • Change the priority of equivalence files by clicking the Move Up and Move Down buttons. If a symbol’s value is found in multiple equivalence files, the footprint from the last matching equivalence file will override earlier equivalence files.

  • 点击“编辑文件”按钮,打开选定的等效文件。

  • Open the selected equivalence file by clicking the Edit File button.

窗口底部会显示相关的环境变量。 选中“相对路径”选项后,这些环境变量将自动用于创建相对于项目或封装库的所选等效文件路径。

Relevant environment variables are shown at the bottom of the window. When the Relative path option is checked, these environment variables will automatically be used to make paths to selected equivalence files relative to the project or footprint libraries.

将所需的等效文件按正确的顺序加载后,单击 执行自动足迹分配图标 封装分配工具顶部工具栏中的按钮即可执行自动封装关联。

Once the desired equivalence files have been loaded in the correct order, automatic footprint association can be performed by clicking the button in the top toolbar of the Footprint Assignment Tool.

所有在已加载的等效文件中具有值的符号都会自动分配封装。但是,已经分配了封装的符号将不会更新。

All symbols with a value found in a loaded equivalence file will have their footprints automatically assigned. However, symbols that already have footprints assigned will not be updated.

等效文件格式

等效文件由一行组成,每行对应一个符号值。每行结构如下:

Equivalence files consist of one line for each symbol value. Each line has the following structure:

'<symbol value>' '<footprint library>:<footprint name>'

'<symbol value>' '<footprint library>:<footprint name>'

每个名称/值都必须用单引号 ( ) 括起来',并用一个或多个空格分隔。以 开头的行#是注释。

Each name/value must be surrounded by single quotes (') and separated by one or more spaces. Lines starting with # are comments.

例如,如果您希望LM4562将所有具有特定值的符号都赋予相同的封装Package_SO:SOIC-8_3.9x4.9_P1.27mm,则等效文件中的相应行应为:

For example, if you want all symbols with the value LM4562 to be assigned the footprint Package_SO:SOIC-8_3.9x4.9_P1.27mm, the line in the equivalence file should be:

'LM4562' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'

'LM4562' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'

以下是一个等效文件示例:

Here is an example equivalence file:

#集成电路(SMD):
'74LV14' 'Package_SO:SOIC-14_3.9x8.7mm_P1.27mm'
'EL7242C' '封装_SO:SOIC-8_3.9x4.9_P1.27mm'
'DS1302N' '封装_SO:SOIC-8_3.9x4.9_P1.27mm'
'LM324N' '封装_SO:SOIC-14_3.9x8.7mm_P1.27mm'
'LM358' '封装_SO:SOIC-8_3.9x4.9_P1.27mm'
'LTC1878' '封装_SO:MSOP-8_3x3mm_P0.65mm'
'24LC512I/SM' '封装_SO:SOIC-8_3.9x4.9_P1.27mm'
'LM2903M' '封装_SO:SOIC-8_3.9x4.9_P1.27mm'
'LT1129_SO8' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'
'LT1129CS8-3.3' '封装_SO:SOIC-8_3.9x4.9_P1.27mm'
'LT1129CS8' '封装_SO:SOIC-8_3.9x4.9_P1.27mm'
'LM358M' '封装_SO:SOIC-8_3.9x4.9_P1.27mm'
'TL7702BID' '封装_SO:SOIC-8_3.9x4.9_P1.27mm'
'TL7702BCD' '封装_SO:SOIC-8_3.9x4.9_P1.27mm'
'U2270B' '封装_SO:SOIC-16_3.9x9.9_P1.27mm'

#监管机构
'LP2985LV' 'Package_TO_SOT_SMD:SOT-23-5_HandSoldering'
#integrated circuits (smd):
'74LV14' 'Package_SO:SOIC-14_3.9x8.7mm_P1.27mm'
'EL7242C' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'
'DS1302N' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'
'LM324N' 'Package_SO:SOIC-14_3.9x8.7mm_P1.27mm'
'LM358' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'
'LTC1878' 'Package_SO:MSOP-8_3x3mm_P0.65mm'
'24LC512I/SM' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'
'LM2903M' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'
'LT1129_SO8' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'
'LT1129CS8-3.3' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'
'LT1129CS8' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'
'LM358M' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'
'TL7702BID' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'
'TL7702BCD' 'Package_SO:SOIC-8_3.9x4.9_P1.27mm'
'U2270B' 'Package_SO:SOIC-16_3.9x9.9_P1.27mm'

#regulators
'LP2985LV' 'Package_TO_SOT_SMD:SOT-23-5_HandSoldering'

查看当前占地面积

Viewing the Current Footprint

封装分配工具包含一个封装查看器。单击 足迹查看器图标顶部工具栏中的按钮即可启动封装查看器并显示所选封装。

The Footprint Assignment Tool contains a footprint viewer. Clicking the button in the top toolbar launches the footprint viewer and shows the selected footprint.

查看足迹

顶部工具栏包含以下命令:

The top toolbar contains the following commands:

刷新24

刷新视图

Refresh view

放大 24

放大

Zoom in

缩小 24

缩小

Zoom out

缩放以适应第 24 页

缩放以使图形适应显示区域

Zoom to fit drawing in display area

形状 3D 24

显示 3D 查看器

Show 3D viewer

左侧工具栏包含以下命令:

The left toolbar contains the following commands:

光标 24

使用选择工具

Use the select tool

测量24

交互式测量两点之间的距离

Interactively measure between two points

网格 24

显示网格点或线条

Display grid dots or lines

极坐标 24

在极坐标系和笛卡尔坐标系之间切换

Switch between polar and cartesian coordinate systems

单位英寸​​ 24

使用英寸

Use inches

24号单位

以密位(1/1000英寸)显示坐标

Display coordinates in mils (1/1000 of an inch)

单位:毫米 24

以毫米为单位显示坐标

Display coordinates in millimeters

光标形状 24

切换显示全窗口十字准星

Toggle display of full-window crosshairs

垫号 24

在草图模式或普通模式下切换绘图板

Toggle between drawing pads in sketch or normal mode

素描本 24

在普通模式或轮廓模式下切换绘图板

Toggle between drawing pads in normal mode or outline mode

文本草图 24

在普通模式和轮廓模式下绘制文本之间切换

Toggle between drawing text in normal mode or outline mode

显示模块边缘 24

在普通模式和轮廓模式下绘制图形线条之间切换

Toggle between drawing graphic lines in normal mode or outline mode

查看当前 3D 模型

点击该3D 查看器图标按钮即可在 3D 模型查看器中打开该模型。

Clicking the button opens the footprint in the 3D model viewer.

如果当前占地面积不存在 3D 模型,则 3D 查看器中只会显示占地面积本身。
3D模型视图

PCB编辑器手册中对3D查看器进行了描述 。

The 3D Viewer is described in the PCB Editor manual.

正向和反向注释

Forward and back annotation

根据原理图更新PCB(正向标注)

Update PCB from Schematic (forward annotation)

使用“从原理图更新PCB”工具,可以将原理图编辑器中的设计信息同步到电路板编辑器。在原理图编辑器和电路板编辑器中,都可以通过“工具”“从原理图更新PCB ” ( F8) 访问该工具。您也可以使用 从原理图图标更新PCB 电路板编辑器顶部工具栏中的图标。此过程通常称为前向标注。

Use the Update PCB from Schematic tool to sync design information from the Schematic Editor to the Board Editor. The tool can be accessed with ToolsUpdate PCB from Schematic (F8) in both the schematic and board editors. You can also use the icon in the top toolbar of the Board Editor. This process is often called forward annotation.

从原理图更新PCB是将设计信息从原理图传递到PCB的首选方法。在旧版本的KiCad中,等效流程是从原理图编辑器导出网络表并将其导入到电路板编辑器。现在不再需要使用网络表文件。
根据原理图更新PCB

该工具会将每个元件符号的封装添加到电路板上,并将更新后的原理图信息传输到电路板。特别是,电路板的网络连接会更新以匹配原理图。带有“ 从电路板排除”属性的元件符号不会被传输到PCB。

The tool adds the footprint for each symbol to the board and transfers updated schematic information to the board. In particular, the board’s net connections are updated to match the schematic. Symbols with the Exclude from board attribute are not transferred to the PCB.

将对 PCB 进行的更改列在“待应用更改”窗格中。单击“更新 PCB”按钮之前,PCB 不会被修改 。

The changes that will be made to the PCB are listed in the Changes To Be Applied pane. The PCB is not modified until you click the Update PCB button.

您可以使用窗口底部的复选框显示或隐藏不同类型的消息。更改报告可以使用 “保存…”按钮保存到文件中。

You can show or hide different types of messages using the checkboxes at the bottom of the window. A report of the changes can be saved to a file using the Save…​ button.

选项

Options

该工具提供了多种控制其行为的选项。

The tool has several options to control its behavior.

选项 描述

根据参考标识符将封装重新链接到原理图符号

Re-link footprints to schematic symbols based on their reference designators

通常情况下,封装通过一个唯一标识符与原理图符号关联,该标识符是在符号添加到原理图时创建的。符号的唯一标识符无法更改,但当符号被删除时,即使使用具有相同参考标识符的符号替换它,该标识符也会丢失。

Footprints are normally linked to schematic symbols via a unique identifier created when the symbol is added to the schematic. A symbol’s unique identifier cannot be changed, but will be lost when the symbol is deleted, even if a symbol with the same reference designator replaces it.

如果选中,PCB 中的每个封装都将重新链接,以便更新每个封装的唯一标识符,使其与具有与封装相同参考指示符的符号相匹配。

If checked, each footprint in the PCB will be re-linked such that each footprint has its unique identifier updated to match the symbol that has the same reference designator as the footprint.

通常情况下,此选项不应勾选。有关何时使用此选项的更多详细信息,请参见下文。

This option should generally be left unchecked. See below for more details on when to use this option.

用符号指定的符号替换足迹。

Replace footprints with those specified by symbols

如果选中,PCB 中的封装将被替换为相应原理图符号中指定的封装。

If checked, footprints in the PCB will be replaced with the footprint that is specified in the corresponding schematic symbol.

如果不选中,即使原理图符号更新为指定不同的封装,PCB 中已有的封装也不会更改。

If unchecked, footprints that are already in the PCB will not be changed, even if the schematic symbol is updated to specify a different footprint.

删除不带符号的足迹

Delete footprints with no symbols

如果选中此项,PCB 上所有在原理图中没有对应符号的封装将被删除。具有“不在原理图中”属性的封装将不受影响。

If checked, any footprint in the PCB without a corresponding symbol in the schematic will be deleted from the PCB. Footprints with the "Not in schematic" attribute will be unaffected.

如果不选中,则不会删除没有对应符号的封装。

If unchecked, footprints without a corresponding symbol will not be deleted.

覆盖锁定

Override locks

如果选中此项,锁定封装不会影响根据原理图更改删除或替换封装。

If checked, locking a footprint will not affect whether a footprint is deleted or replaced based on changes in the schematic.

如果不进行检查,即使原本应该被删除或替换,锁定的足迹也永远不会被删除或替换。

If unchecked, locked footprints will never be deleted or replaced even if they otherwise would be.

根据符号更新足迹字段

Update footprint fields from symbols

如果选中此项,符号中的新增和更新字段将传输到相应的封装中,从而保持符号和封装字段同步。

If checked, new and updated fields in symbols will be transferred to the corresponding footprints, keeping symbol and footprint fields in sync.

如果未选中,则当相应符号中的字段发生变化时,封装字段将不会更新。

If unchecked, footprint fields will not be updated when fields change in the corresponding symbols.

移除符号中未找到的封装字段

Remove footprint fields not found in symbols

如果选中此项,则当对应的符号中不存在封装字段时,将删除这些封装字段。

If checked, footprint fields will be removed if they do not exist in the corresponding symbol.

如果不选中,则不会删除相应符号中不存在的封装字段,从而允许封装拥有比相应符号更多的字段。

If unchecked, footprint fields that do not exist in the corresponding symbol will not be removed, allowing footprints to have additional fields compared to the corresponding symbols.

重新链接符号和足迹

Re-linking symbols and footprints

符号和封装通过唯一标识符(也称为 UUID)关联起来。这些标识符在 KiCad 中自动处理,通常对用户不可见。即使参考标识符发生更改,它们也能确保符号及其对应的封装在原理图和 PCB 之间保持关联。新对象在创建时会被分配标识符。

Symbols and footprints are linked together using unique identifiers (also called UUIDs). These are handled automatically within KiCad and are not usually visible to users. They allow a symbol and its partner footprint to keep their connection between schematic and PCB, even if the reference designator is changed. New objects get assigned their identifiers upon creation.

通过唯一标识符重新链接(默认)

正常使用时,“根据参考标识符将封装重新链接到原理图符号”选项应取消选中。在此模式下,与封装具有相同标识符的符号将更新该封装,而忽略参考标识符。标识符与任何封装都不匹配的符号将添加一个链接到该标识符的新封装。

In normal use, the Re-link footprints to schematic symbols based on their reference designators option should be unchecked. In this mode, symbols with the same identifier as a footprint will update that footprint, regardless of the reference designator. Symbols which have an identifier that doesn’t match any footprint will add a new footprint linked to that identifier.

例如,在下面的原理图中,两者均R1通过R2其唯一 ID 链接到 PCB 上的封装:

For example, in the below schematic, both R1 and R2 are linked via their unique IDs to footprints on the PCB:

在参考指示符更改之前,通过唯一标识符进行前向注释链接

如果原理图中的符号参考指示符发生更改(例如通过重新注释),则运行“从原理图更新 PCB”流程将更新 PCB 上的参考指示符。

If symbol reference designators are changed in the schematic (e.g. by re-annotation), running the Update PCB from Schematic process will update the reference designators on the PCB.

在参考指示符更改后,通过唯一标识符进行前向注释链接
通过参考标识符重新链接

如果选中此复选框,则链接过程将使用参考标识符。这对于需要删除符号并替换为另一个符号(而不是就地更新)的工作流程非常有用。例如,剪切粘贴原理图或图纸的一部分,然后再复制粘贴并重新注释,通常会破坏基于标识符的链接。

If the checkbox is checked, the linking process is done using the reference designators. This can be useful for workflows that result in a symbol being deleted and replaced by another one, rather than being updated in-place. For example, cut-and-pasting a block of schematic or a sheet and copy-pasting and re-annotating will usually break the identifier-based links.

例如,在下面的例子中,电阻器被删除R1R2替换,然后重新标注。虽然参考标识符相同,但内部标识符已更改。如果按标识符更新 PCB,则现有封装将被删除并添加新的封装——在 KiCad 中,现有封装没有匹配的符号。这将导致封装丢失位置,需要重新放置。

For example in the below case, the resistors R1 and R2 have been deleted and replaced, then re-annotated. While the reference designators are the same, the internal identifiers have changed. Updating the PCB by identifier would cause the existing footprints to be deleted and new ones added - to KiCad, the existing footprints have no matching symbol. This would cause the footprints to lose their positions and need placing again.

在删除和替换符号之后,但在更新PCB之前,通过参考标识符进行前向注释链接。

通过参考标识符重新链接封装,KiCad 会使用匹配的参考标识符作为指导,重新创建链接。

Re-linking the footprints by reference designator causes KiCad to re-create the links, using the matching reference designators as a guide.

更新PCB后,通过参考标识符进行前向注释链接。

由于链接已重新建立,下一个前向注释应使用正常的基于标识符的链接(即复选框应取消选中)。

Because the links have been re-established, the next forward annotation should use the normal identifier-based linking (i.e. the checkbox should be unchecked).

根据PCB(背面标注)更新原理图

Update Schematic from PCB (back annotation)

在 KiCad 中,典型的工作流程是在原理图中进行更改,然后使用“从原理图更新 PCB”工具将更改同步到电路板。但是,反向操作也是可行的:可以在电路板上进行设计更改,然后使用原理图编辑器或电路板编辑器中的“工具”“从 PCB 更新原理图”将更改同步回原理图。此过程也称为反向注释。

The typical workflow in KiCad is to make changes in the schematic and then sync the changes to the board using the Update PCB From Schematic tool. However, the reverse process is also possible: design changes can be made in the board and then synced back to the schematic using ToolsUpdate Schematic From PCB in either the schematic or board editors. This process is also known as backannotation.

根据PCB更新原理图

该工具可将电路板上的参考标识符、值、属性(例如 DNP 或从 BOM 中排除)、封装分配、其他字段和网络名称的更改同步到原理图。每种类型的更改都可以单独启用或禁用。

The tool syncs changes in reference designators, values, attributes (like DNP or Exclude From BOM), footprint assignments, other fields, and net names from the board to the schematic. Each type of change can be individually enabled or disabled.

将对原理图进行的更改列在“待应用更改”窗格中。单击“更新原理图”按钮之前,原理图不会被修改。

The changes that will be made to the schematic are listed in the Changes To Be Applied pane. The schematic is not modified until you click the Update Schematic button.

您可以使用窗口底部的复选框显示或隐藏不同类型的消息。更改报告可以使用 “保存…”按钮保存到文件中。

You can show or hide different types of messages using the checkboxes at the bottom of the window. A report of the changes can be saved to a file using the Save…​ button.

选项

Options

该工具提供了多种控制其行为的选项。

The tool has several options to control its behavior.

选项

Option

描述

Description

根据参考标识符将封装重新链接到原理图符号

Re-link footprints to schematic symbols based on their reference designators

选中此选项后,PCB 中的每个封装都将重新链接到与其具有相同参考标识符的符号。此选项与更新符号参考标识符不兼容。

If checked, each footprint in the PCB will be re-linked to the symbol that has the same reference designator as the footprint. This option is incompatible with updating symbol reference designators.

如果不选中,封装和符号将像往常一样通过唯一标识符链接,而不是通过参考指示符链接。

If unchecked, footprints and symbols will be linked by unique identifier as usual, rather than by reference designator.

参考指示符

Reference designators

如果选中,符号参考标识符将更新为与链接封装的参考标识符匹配。

If checked, symbol reference designators will be updated to match the reference designators of the linked footprints.

如果不选中,符号引用指示符将不会更新。

If unchecked, symbol reference designators will not be updated.

价值观

Values

如果选中,符号值将更新为与链接封装的值匹配。

If checked, symbol values will be updated to match the values of the linked footprints.

如果不选中,符号值将不会更新。

If unchecked, symbol values will not be updated.

属性

Attributes

如果选中,符号属性(如从 BOM 中排除和 DNP)将更新为与链接封装的相应属性匹配。

If checked, symbol attributes (like exclude from BOM and DNP) will be updated to match the corresponding attributes of the linked footprints.

如果不选中,符号属性将不会更新。

If unchecked, symbol attributes will not be updated.

足迹分配

Footprint assignments

如果选中此项,则电路板上封装已更改或替换的符号的封装分配将会更新。

If checked, footprint assignments will be updated for symbols which have had their footprints changed or replaced in the board.

如果不选中,符号封装分配将不会更新。

If unchecked, symbol footprint assignments will not be updated.

净名称

Net names

如果选中,原理图将根据电路板上所做的任何网络名称更改进行更新。网络标签将根据需要更新或添加到原理图中,以与电路板匹配。

If checked, the schematic will be updated with any net name changes that have been made in the board. Net labels will be updated or added to the schematic as necessary to match the board.

如果不选中,原理图中的网络名称将不会更新。

If unchecked, net names will not be updated in the schematic.

其他领域

Other fields

选中此项后,其他符号字段将更新为与链接封装的相应字段匹配。参考标识符、值和封装分别由各自的选项控制。

If checked, other symbol fields will be updated to match the corresponding fields of the linked footprints. Reference designator, value, and footprint are each controlled by their own separate option.

如果不选中,原理图中的其他字段将不会更新。

If unchecked, other fields will not be updated in the schematic.

地理重新标注 功能可以与反向标注参考指示符结合使用,根据布局中的位置重新标注设计中的所有组件。

使用 CMP 文件进行反向注释

Back annotation with CMP files

也可以通过从 PCB 编辑器导出 CMP 文件(文件导出封装关联 (.cmp) 文件… ​)并将其导入原理图编辑器(文件导入封装分配… ​)将选定的更改同步回原理图。

Select changes can also be synced from the PCB back to the schematic by exporting a CMP file from the PCB editor (FileExportFootprint Association (.cmp) File…​) and importing it in the Schematic Editor (FileImportFootprint Assignments…​).

此方法只能同步对封装分配和封装字段所做的更改。建议改用“从PCB更新原理图”工具。

生成输出

Generating Outputs

印刷

Printing

KiCad 可以使用“文件”“打印…”将原理图打印到标准打印机。

KiCad can print the schematic to a standard printer using FilePrint…​.

打印对话框

打印选项

Printing options

  • 打印图纸:在打印的原理图中包括图纸边框和标题栏。

  • Print drawing sheet: Include the drawing sheet border and title block in the printed schematic.

  • 输出模式:彩色或黑白打印原理图。

  • Output mode: Print the schematic in color or black and white.

  • 打印背景颜色:在打印的原理图中设置背景颜色。此选项仅在彩色打印时可用。

  • Print background color: Include the background color in the printed schematic. This option is only enabled when printing in color.

  • 打印时使用不同的颜色主题:选择与原理图编辑器中显示的配色方案不同的配色方案进行打印。

  • Use a different color theme for printing: Select a different color scheme for printing than the one selected for display in the Schematic Editor.

  • 页面设置…:打开页面设置对话框,用于设置纸张大小和方向。

  • Page Setup…​: Opens a page setup dialog for setting paper size and orientation.

  • 关闭:关闭对话框而不打印任何内容。

  • Close: Closes the dialog without printing.

  • 打印:打开系统打印对话框。

  • Print: Opens the system print dialog.

打印操作使用特定于平台和打印机的驱动程序,可能会出现意外结果。打印到文件时,建议使用绘图功能而不是打印功能

绘制

Plotting

KiCad 可以使用“文件”“绘图…”将原理图绘制到文件中。

KiCad can plot schematics to a file using FilePlot…​.

支持的输出格式有 Postscript、PDF、SVG、DXF 和 HPGL。

The supported output formats are Postscript, PDF, SVG, DXF, and HPGL.

剧情对话框

“输出消息”窗格显示有关生成文件的消息。可以使用复选框显示或隐藏不同类型的消息,并使用“保存…”按钮将消息保存到文件中。

The Output Messages pane displays messages about the generated files. Different kinds of messages can be shown or hidden using the checkboxes, and the messages can be saved to a file using the Save…​ button.

绘制当前页”按钮绘制原理图的当前页。“ 绘制所有页”按钮绘制原理图的所有页。除 PDF 输出外,每个页面都会生成一个文件;PDF 输出会将原理图的每个页面绘制成单个 PDF 文件中的单独页面。

The Plot Current Page button plots the current page of the schematic. The Plot All Pages button plots all pages of the schematic. One file is generated for each page, except for PDF output, which plots each schematic page as a separate page in a single PDF file.

绘图选项

Plotting options

  • 输出目录:指定保存绘图文件的位置。如果是相对路径,则相对于项目目录创建。此路径可以使用文本变量,包括项目文本变量和内置文本变量。

  • Output directory: Specify the location to save plotted files. If this is a relative path, it is created relative to the project directory. This path can use text variables, including both project text variables and built-in text variables.

  • 输出格式:选择绘图格式。不同格式的选项有所不同。

  • Output Format: Select the format to plot in. Some formats have different options than others.

  • 页面尺寸:设置用于绘制输出的页面尺寸。可以设置为与原理图尺寸相同,也可以设置为其他图纸尺寸。

  • Page size: Sets the page size to use for the plotted output. This can be set to match the schematic size or to another sheet size.

  • 绘图图纸:在打印的原理图中包括绘图图纸边框和标题栏。

  • Plot drawing sheet: Include the drawing sheet border and title block in the printed schematic.

  • 输出模式:设置输出为彩色或黑白。并非所有输出格式都支持彩色。

  • Output mode: Sets the output to color or black and white. Not all output formats support color.

  • 颜色主题:选择用于绘图输出的颜色主题。

  • Color theme: Selects the color theme to use for the plotted output.

  • 绘图背景颜色:包括绘图输出中的原理图背景颜色。如果输出格式不支持彩色或输出模式为黑白,则不会绘制背景颜色。

  • Plot background color: Includes the schematic background color in the plotted output. The background color will not be plotted if the output format does not support color or the output mode is black and white.

  • 最小线宽:选择线条的最小宽度。任何小于此宽度的线条都将以该最小宽度绘制。

  • Minimum line width: Selects the minimum width for lines. Any lines narrower than this width will be plotted with this minimum width.

  • 位置和单位:设置绘图仪原点和单位。此选项仅适用于 HPGL 输出。

  • Position and units: Sets the plotter origin and units. This option only applies for HPGL output.

  • 笔宽:设置绘图仪的笔宽。此选项仅适用于 HPGL 输出。

  • Pen width: Sets the plotter’s pen width. This option only applies for HPGL output.

  • 生成属性弹出窗口:启用下述交互式 PDF 功能。此选项仅适用于 PDF 输出。

  • Generate property popups: Enables the interactive PDF features described below. This option only applies for PDF output.

  • 为层级元素生成可点击链接:启用可点击的层级工作表、层级工作表图钉和层级标签。启用后,点击 PDF 中的层级工作表或图钉将打开该子工作表的 PDF 页面。点击层级标签将打开其父工作表的页面。如果同时启用了“生成属性弹出窗口”,则会为层级工作表、图钉和标签生成链接,而不是属性弹出窗口(即此选项优先级更高)。此选项仅适用于 PDF 输出。

  • Generate clickable links for hierarchical elements: Enables clickable hierarchical sheets, hierarchical sheet pins, and hierarchical labels. When enabled, clicking a hierarchical sheet or sheet pin in the PDF will open the PDF page for that subsheet. Clicking a hierarchical label will open the page for the parent sheet. If Generate property popups is also enabled, links will be generated instead of property popups for hierarchical sheets, pins, and labels (i.e. this option takes priority). This option only applies for PDF output.

  • 根据 AUTHOR 和 SUBJECT 变量生成元数据:如果您已定义 AUTHOR 和 SUBJECT 变量,则根据这些变量设置生成的 PDF 文档的作者和主题属性。此选项仅适用于AUTHOR PDFSUBJECT 输出

  • Generate metadata from AUTHOR and SUBJECT variables: Sets the Author and Subject PDF document properties for the generated PDF based on the AUTHOR and SUBJECT project text variables, if you have defined them. This option only applies for PDF output.

  • 绘图完成后打开文件:绘图完成后自动打开绘图输出文件。

  • Open file after plot: automatically opens the plotted output file when plotting is complete.

交互式 PDF 功能

Interactive PDF features

绘制的 PDF 文件可以选择性地包含多个交互式功能。

Plotted PDFs can optionally have several interactive features.

符号字段弹出窗口
  • 超链接可以点击。

  • Hyperlinks can be clicked.

  • 目录中包含了示意图以及每张示意图中的符号和层级标签。

  • The table of contents is populated with schematic sheets as well as the symbols and hierarchical labels in each sheet.

  • 点击原理图中的多个元件会弹出包含相关信息的菜单。

    • 符号显示其符号字段。

    • 层级子工作表会显示其工作表名称和文件名,以及进入工作表本身的选项。如果 启用了“为层级元素生成可点击链接”选项,则会显示指向子工作表的直接链接。

    • 标签显示已解析的网络和网络类别。

    • 公交车上会展示其会员信息。

  • Clicking on many schematic elements displays a popup menu containing relevant information.

    • Symbols display their symbol fields.

    • Hierarchical subsheets display their sheetname and filename, as well as an option to enter the sheet itself. This is replaced by a direct link to the subsheet if the Generate clickable links for hierarchical elements option is enabled.

    • Labels display the resolved net and netclass.

    • Buses display their members.

并非所有 PDF 阅读器都支持某些功能。“为层级元素生成可点击链接” 选项生成的可点击链接比其他交互式功能支持范围更广。

生成物料清单

Generating a bill of materials

KiCad 可以生成物料清单 (BOM),其中列出了设计中的所有组件。BOM 是可配置的:您可以选择包含哪些组件、组件的排序方式、包含哪些符号字段及其顺序,以及输出格式。

KiCad can generate a bill of materials that lists all of the components in the design. BOMs are configurable: you can select which components are included, how components are ordered, which symbol fields are included and in what order, and what the output format is.

物料清单 (BOM) 使用符号字段表导出。要快速打开此对话框的“导出”选项卡,您可以选择“工具”“生成物料清单…”或使用 BOM图标顶部工具栏上的按钮。

BOMs are exported using the Symbol Fields Table. As a shortcut to open the Export tab of this dialog, you can select ToolsGenerate Bill of Materials…​ or use the button on the top toolbar.

BOM 的内容在“编辑”选项卡中配置。导出的 BOM 文件的格式在“导出”选项卡中配置。单击对话框底部的“导出”按钮即可写入 BOM。

The contents of the BOM are configured in the Edit tab. The format of the exported BOM file is configured in the Export tab. The BOM is written when you press the Export button at the bottom of the dialog.

物料清单内容

BOM contents

导出的物料清单 (BOM) 将包含与“编辑”选项卡中显示的完全相同的组件(行)和字段(列),分组和排序方式也相同。设置了“从 BOM中排除”属性的组件在“编辑”选项卡中将被隐藏,并且除非选中“显示‘从 BOM 中排除’”复选框,否则不会包含在 BOM 导出中。设置了“DNP”(不填充)属性的组件可以通过选中“排除 DNP”复选框,选择性地从“编辑”选项卡中的表格和导出的 BOM中排除。您还可以通过调整范围设置,将显示的组件限制为当前图纸、当前图纸及其所有子图纸或整个原理图中的组件。

The exported BOM will contain exactly the components (rows) and fields (columns) shown in the Edit tab, with the same grouping and sorting. Components with the Exclude from BOM attribute set are hidden in the Edit tab and not included in the BOM export unless the Show 'Exclude from BOM' box is checked. Components with the DNP (do not populate) attribute set can be optionally excluded from both the table in the Edit tab and the exported BOM by checking the Exclude DNP box. You can also limit the displayed components to those in the current sheet, the current sheet and all of its subsheets, or the entire schematic by adjusting the Scope settings.

符号字段表编辑选项卡

选中“显示”复选框的字段将作为列包含在物料清单 (BOM) 中,选中“分组依据”复选框的字段用于将组件分组。如果所有组件的“分组依据”字段都相同,并且选中了“分组符号”复选框,则这些组件将被分组到同一行。您可以为每个字段设置任意列名,并通过拖动列标题来重新排列列的顺序。

Fields with the Show box checked will be included as columns in the BOM, and fields with the Group By box checked are used to group components together. Components are grouped into the same line if all of their Group By fields are identical and the Group symbols box is checked. You can set an arbitrary column name for each field and reorder columns by dragging their headers.

预设可用于配置字段列表。预设会存储要显示的字段、用于分组的字段以及列顺序。您可以创建并保存自己的预设,也可以使用几个默认预设之一。自定义预设可以在此对话框或 “原理图设置”对话框中删除。

Presets are available to configure the list of fields. Presets store which fields are displayed, which fields are used for grouping, and the column order. You can create and save your own presets or use one of several default presets. Custom presets can be deleted in this dialog or in the Schematic Setup dialog.

内置预设“按值分组”和“按值和封装分组”复制了传统的 BOM 脚本,而“属性”仅显示参考和值字段以及 DNP、从电路板中排除、从仿真中排除和从 BOM 中排除的属性。

The built-in presets "Grouped By Value" and "Grouped By Value and Footprint" replicate legacy BOM scripts, while "Attributes" shows only the reference and value fields and the DNP, exclude from board, exclude from simulation, and exclude from BOM attributes.

有些虚拟字段可用于 BOM 导出。在“符号字段表”中添加以 文本变量开头的字段不会在符号中创建新字段,而是在表和 BOM 中创建一个特殊列,其中包含每个组件的自动生成值。以下变量对于在自定义 BOM 格式中创建虚拟字段尤其有用:

Some virtual fields are available that may be useful in BOM exports. Adding a field in the Symbol Fields Table beginning with a text variable will not create a new field in the symbols, but will create a special column in the table and BOM with auto-generated values for each component. The following variables may be especially useful for creating virtual fields in custom BOM formats:

  • ${QUANTITY}创建一个字段,其中包含该组件的分组实例数。

  • ${QUANTITY} creates a field that contains the number of grouped instances of that component.

  • ${ITEM_NUMBER}创建一个字段,其中包含物料清单中组件的行号。

  • ${ITEM_NUMBER} creates a field that contains the row number of the component in the BOM.

  • ${SYMBOL_NAME}创建一个包含原理图符号名称的字段。

  • ${SYMBOL_NAME} creates a field that contains the name of the schematic symbol.

  • ${SYMBOL_LIBRARY}创建一个字段,其中包含原理图符号库的名称。

  • ${SYMBOL_LIBRARY} creates a field that contains the name of the schematic symbol library.

  • ${DNP}创建一个包含复选框的字段,用于控制组件的 DNP 属性。在物料清单 (BOM) 中,如果组件的 DNP 属性已设置,则此字段解析为字符串“DNP”;否则,解析为空字符串。

  • ${DNP} creates a field with a checkbox that controls the component’s DNP attribute. In the BOM, this field resolves to the string "DNP" if the component’s DNP attribute is set, or an empty string otherwise.

  • ${EXCLUDE_FROM_BOARD}创建一个包含复选框的字段,用于控制组件的“从电路板中排除”属性。在物料清单 (BOM) 中,如果组件的“从电路板中排除”属性已设置,则此字段解析为字符串“已从电路板中排除”,否则解析为空字符串。

  • ${EXCLUDE_FROM_BOARD} creates a field with a checkbox that controls the component’s exclude from board attribute. In the BOM, this field resolves to the string "Excluded from board" if the component’s exclude from board attribute is set, or an empty string otherwise.

  • ${EXCLUDE_FROM_SIM}创建一个包含复选框的字段,用于控制组件的“排除在仿真之外”属性。在物料清单 (BOM) 中,如果组件的“排除在仿真之外”属性已设置,则此字段解析为字符串“已排除在仿真之外”;否则,解析为空字符串。

  • ${EXCLUDE_FROM_SIM} creates a field with a checkbox that controls the component’s exclude from simulation attribute. In the BOM, this field resolves to the string "Excluded from simulation" if the component’s exclude from simulation attribute is set, or an empty string otherwise.

  • ${EXCLUDE_FROM_BOM}创建一个包含复选框的字段,用于控制组件是否包含在物料清单 (BOM) 中。设置了“从物料清单中排除”属性的组件将不会包含在物料清单中。

  • ${EXCLUDE_FROM_BOM} creates a field with a checkbox that controls the component’s exclude from BOM attribute. Components with the exclude from BOM attribute set are not included in the BOM.

还有其他文本变量可用。

Other text variables are also available.

“编辑”选项卡的全部功能(包括虚拟字段行为)在“符号字段表”文档中有更详细的说明 。

The full functionality of the Edit tab, including virtual field behavior, is explained in more detail in the Symbol Fields Table documentation.

BOM格式

BOM format

“导出”选项卡包含有关物料清单输出文件格式的设置,并显示原始物料清单文件输出的预览。

The Export tab contains settings concerning the output file format for the BOM and displays a preview of the raw BOM file output.

符号字段表导出选项卡

在顶部可以指定输出文件。按下“导出”按钮会将物料清单 (BOM) 写入到指定文件路径。该路径可以包含 文本变量

At the top you can specify the output file. Pressing the Export button will write the BOM to this file path. This path can contain text variables.

左侧的设置控制文件中 BOM 信息的格式。您可以更改字段之间的分隔符、每个字段周围的分隔符、分隔一系列引用的分隔符(例如 `<b>` 中的逗号R1,R3)以及引用范围的分隔符(例如 `<b>` 中的短横线 R1-R3)。如果未指定范围分隔符,则不会使用范围:例如,假设 `<b>`作为引用分隔符R1-R3,则 `<b>` 将被写入为 `<b>` 。字段中的制表符和换行符可以保留或删除,具体取决于“保留制表符”“保留换行符”设置。R1,R2,R3,

The settings on the left control how the BOM information is formatted in the file. You can change the delimiter between fields, the delimiter that surrounds each field, the delimiter that separates a sequence of references (e.g. the comma in R1,R3), and the delimiter for a range of references (e.g. the dash in R1-R3). If no range delimiter is given, ranges will not be used: R1-R3 will be written out as R1,R2,R3, for example, assuming , as a reference delimiter. Tabs and newlines in fields can be preserved or stripped, depending on the Keep tabs and Keep line breaks settings.

系统提供多种默认格式预设。您可以选择逗号分隔值 (CSV) 格式、制表符分隔值 (TSV) 格式或分号分隔值格式。您也可以创建并保存自己的预设。自定义预设可以在此对话框或“原理图设置”对话框中删除。

Several default format presets are available. You can select a comma-separated value (CSV) format, a tab-separated value (TSV) format, or a semicolon-separated format. You can also create and save your own presets. Custom presets can be deleted in this dialog or in the Schematic Setup dialog.

传统物料清单生成

Legacy BOM generation

早期版本的 KiCad 使用外部脚本将设计信息处理成所需的输出格式。您仍然可以通过选择“工具”“生成旧版物料清单…”来使用此物料清单生成工具。

Previous versions of KiCad used external scripts to process the design information into the desired output format. This BOM generation tool is still available by selecting ToolsGenerate Legacy Bill of Materials…​.

物料清单对话框

KiCad 内置了多个物料清单 (BOM) 生成器脚本,用户也可以创建自己的脚本。BOM 生成器脚本通常使用 Python 或 XSLT,但只要能为 KiCad 运行生成器时指定要执行的命令行,也可以使用其他工具。

Several BOM generator scripts are included with KiCad, and users can also create their own. BOM generator scripts generally use Python or XSLT, but other tools can be used as long as you can specify a command line for KiCad to execute when running the generator.

您可以在BOM 生成器脚本列表中选择要使用的 BOM 生成器。对话框的其余部分将显示有关所选生成器的信息。您可以使用“生成器别名” 文本框更改生成器的显示名称。

You can select which BOM generator to use in the BOM generator scripts list. The rest of the dialog displays information about the selected generator. You can change the displayed name of the generator with the Generator nickname textbox.

右侧窗格显示所选脚本的相关信息。当生成器执行时,右侧窗格将显示脚本的输出结果。

The pane at right displays information about the selected script. When the generator is executed, the right pane instead displays output from the script.

底部的文本框包含 KiCad 用于执行生成器的命令。选择脚本后,该文本框会自动填充,但某些生成器可能需要手动编辑命令。KiCad 会在 BOM 工具关闭时保存每个生成器的命令行,因此命令行自定义设置会被保留。有关命令行的更多详细信息,请参阅 高级文档

The text box at the bottom contains the command that KiCad will use to execute the generator. It is automatically populated when a script is selected, but the command may need to be hand-edited for some generators. KiCad saves the command line for each generator when the BOM tool is closed, so command line customizations are preserved. For more details about the command line, see the advanced documentation.

在 Windows 系统中,“物料清单生成器”对话框新增了一个选项“显示控制台窗口”。如果取消选中此选项,物料清单生成器将在一个隐藏的控制台窗口中运行,所有输出都会被重定向并显示在对话框中。如果选中此选项,物料清单生成器将在一个可见的控制台窗口中运行,如果生成器插件提供了图形用户界面,则可能需要使用此选项。

On Windows, the BOM Generator dialog has an additional option Show console window. When this option is unchecked, BOM generators run in a hidden console window and any output is redirected and printed in the dialog. When this option is checked, BOM generators run in a visible console window, which may be necessary if the generator plugin provides a graphical user interface.

BOM生成器脚本

默认情况下,旧版 BOM 工具提供三种输出脚本选项。

By default, the legacy BOM tool presents three output script options.

  • bom_csv_grouped_extra输出一个 CSV 文件,其中包含设计中所有组件的单个部分。组件按值、封装、DNP(不填充)以及命令行中指定的任何其他字段进行分组。要指定其他字段,请在命令行末尾添加所需的字段名称(以带引号的字符串形式)。例如,要包含字段MPN,命令行末尾应为:<path to script>/bom_csv_grouped_extra.py "%I" "%O.csv" "MPN"。BOM 表中的列如下:

    • 行项目编号

    • 参考标识符

    • 数量

    • 价值

    • 脚印

    • DNP

    • 指定的额外字段

  • bom_csv_grouped_extra outputs a CSV with a single section containing every component in the design. Components are grouped by value, footprint, DNP (do not populate), and any additional fields that are specified on the command line. To specify extra fields, add the desired field names as quoted strings at the end of the command line. For example, to include the MPN field, the end of the command line would be: <path to script>/bom_csv_grouped_extra.py "%I" "%O.csv" "MPN". The columns in the BOM are:

    • Line item number

    • Reference designator(s)

    • Quantity

    • Value

    • Footprint

    • DNP

    • Specified extra fields

  • bom_csv_grouped_by_value输出一个包含两部分的 CSV 文件。第一部分包含设计中的所有元件,每行一个元件。第二部分也包含所有元件,但元件按符号名称、值、封装和 DNP(不填充)分组。BOM 表中的列如下:

    • 行项目编号

    • 数量

    • 参考标识符

    • 价值

    • 符号库和符号名称

    • 脚印

    • 数据表

    • DNP

    • 任何其他符号字段

  • bom_csv_grouped_by_value outputs a CSV with two sections. The first section contains every component in the design, with a single component on each line. The second section also contains every component, but components are grouped by symbol name, value, footprint, and DNP (do not populate). The columns in the BOM are:

    • Line item number

    • Quantity

    • Reference designator(s)

    • Value

    • Symbol library and symbol name

    • Footprint

    • Datasheet

    • DNP

    • Any other symbol fields

  • bom_csv_grouped_by_value_with_fp输出一个 CSV 文件,其中包含设计中所有组件的单个部分。组件按价值、封装和 DNP(不填充)分组。BOM 表中的列如下:

    • 参考标识符

    • 数量

    • 价值

    • 符号名称

    • 脚印

    • 符号说明

    • 小贩

    • DNP

  • bom_csv_grouped_by_value_with_fp outputs a CSV with a single section containing every component in the design. Components are grouped by value, footprint, and DNP (do not populate). The columns in the BOM are:

    • Reference designator(s)

    • Quantity

    • Value

    • Symbol name

    • Footprint

    • Symbol description

    • Vendor

    • DNP

KiCad 还安装了一些额外的生成器脚本,但默认情况下这些脚本不会显示在生成器脚本列表中。这些脚本的位置取决于操作系统,并且可能因安装位置而异。

Additional generator scripts are installed with KiCad but are not populated in the generator script list by default. The location of these scripts depends on the operating system and may vary based on installation location.

操作系统 地点

视窗

Windows

C:\Program Files\KiCad\9.0\bin\scripting\plugins\

C:\Program Files\KiCad\9.0\bin\scripting\plugins\

Linux

Linux

/usr/share/kicad/plugins/

/usr/share/kicad/plugins/

macOS

macOS

/Applications/KiCad/KiCad.app/Contents/SharedSupport/plugins/

/Applications/KiCad/KiCad.app/Contents/SharedSupport/plugins/

点击按钮即可向 BOM 生成器脚本列表添加其他脚本加号图标。点击按钮即可删除脚本删除图标 。该编辑图标按钮会在文本编辑器中打开所选脚本。

Additional scripts can be added to the list of BOM generator scripts by clicking the button. Scripts can be removed by clicking the button. The button opens the selected script in a text editor.

有关创建和使用自定义 BOM 生成器的更多信息,请参阅 高级文档

For more information on creating and using custom BOM generators, see the advanced documentation.

从PCB编辑器导出BOM

BOM export from PCB editor

PCB 编辑器可以通过“文件”“制造输出”“BOM…”导出 BOM 。此方法无法控制输出格式,且不包含所有符号信息,但适用于不涉及原理图的纯 PCB 工作流程。通常建议使用原理图编辑器的 BOM 导出工具。

The PCB Editor can export a BOM through FileFabrication OutputsBOM…​. This method provides no control over the output format and does not include all symbol information, but is useful for PCB-only workflows that do not involve a schematic. In general, it is recommended to use the schematic editor’s BOM export tool instead.

生成网表

Generating a Netlist

网表是一个描述符号引脚之间电气连接的文件。这些连接被称为网络。网表文件包含:

A netlist is a file which describes electrical connections between symbol pins. These connections are referred to as nets. Netlist files contain:

  • 符号及其对应的引脚列表。

  • A list of symbols and their pins.

  • 符号引脚之间的连接(网络)列表。

  • A list of connections (nets) between symbol pins.

存在多种不同的网表格式。有时,符号列表和网络列表是两个单独的文件。网表对于原理图绘制软件的使用至关重要,因为它是与其他电子CAD软件(例如PCB布局软件、仿真器和可编程逻辑编译器)连接的基础。

Many different netlist formats exist. Sometimes the symbols list and the list of nets are two separate files. This netlist is fundamental in the use of schematic capture software, because the netlist is the link with other electronic CAD software, such as PCB layout software, simulators, and programmable logic compilers.

KiCad 支持多种网络表格式:

KiCad supports several netlist formats:

  • KiCad格式的文件可以被KiCad PCB编辑器导入。但是,应该使用“从原理图更新PCB” 工具,而不是将KiCad网表导入PCB编辑器。

  • KiCad format, which can be imported by the KiCad PCB Editor. However, the "Update PCB from Schematic" tool should be used instead of importing a KiCad netlist into the PCB editor.

  • OrCAD PCB2 格式,用于使用 OrCAD 设计 PCB。

  • OrCAD PCB2 format, for designing PCBs with OrCAD.

  • Allegro格式,用于使用Allegro设计PCB。

  • Allegro format, for designing PCBs with Allegro.

  • PADS 格式,用于设计带有 PADS 的 PCB。

  • PADS format, for designing PCBs with PADS.

  • CADSTAR 格式,用于使用 CADSTAR 设计 PCB。

  • CADSTAR format, for designing PCBs with CADSTAR.

  • Spice 格式,可用于各种外部电路仿真器。

  • Spice format, for use with various external circuit simulators.

在 KiCad 5.0 及更高版本中,无需创建网表即可将设计从原理图编辑器传输到 PCB 编辑器。只需使用 “从原理图更新 PCB”工具即可。
其他使用网表的软件工具可能对元件名称、引脚、网络和其他字段中的空格和特殊字符有限制。为了兼容性,请注意您计划使用的其他工具中的此类限制,并据此命名元件、网络等。

网表格式

Netlist formats

使用“导出网表”对话框导出网表(文件导出网表… ​)。

Netlists are exported with the Export Netlist dialog (FileExportNetlist…​).

KiCad网表导出

KiCad 支持导出多种格式的网络表:KiCad、OrcadPCB2、Allegro、PADS、CADSTAR、Spice 和 Spice Model。您可以通过选择窗口顶部的相应选项卡来选择所需的格式。某些网络表格式还提供其他选项。

KiCad supports exporting netlists in several formats: KiCad, OrcadPCB2, Allegro, PADS, CADSTAR, Spice, and Spice Model. Each format can be selected by selecting the corresponding tab at the top of the window. Some netlist formats have additional options.

单击“导出网表”按钮,系统会提示输入网表文件名并保存网表。

Clicking the Export Netlist button prompts for a netlist filename and saves the netlist.

对于大型原理图,生成网表可能需要几分钟时间。

点击“添加生成器…”按钮,即可添加其他网表格式的自定义生成器。自定义生成器是 KiCad 调用的外部工具,例如 Python 脚本或 XSLT 样式表。有关自定义网表生成器的更多信息,请参阅“ 添加自定义网表生成器”部分

Custom generators for other netlist formats can be added by clicking the Add Generator…​ button. Custom generators are external tools that are called by KiCad, for example Python scripts or XSLT stylesheets. For more information on custom netlist generators, see the section on adding custom netlist generators.

香料网表格式
Spice网表导出

Spice网表格式提供了多种选项。

The Spice netlist format offers several options.

  • 如果选择“以当前图纸为根”,则仅将当前图纸导出到子电路模型。否则,将导出整个原理图图纸。

  • When the use current sheet as root is selected, only the current sheet is exported to a subcircuit model. Otherwise, the entire schematic sheet is exported.

  • “保存所有电压”选项会向网表中添加一条.save all命令,使仿真器保存所有节点电压。

  • The Save all voltages option adds a .save all command to the netlist, which causes the simulator to save all node voltages.

  • “保存所有电流”选项会向网表中添加一条.probe alli命令,该命令会使仿真器保存所有节点电流。

  • The Save all currents option adds a .probe alli command to the netlist, which causes the simulator save all node currents.

  • “保存所有功耗”命令用于.probe保存每个组件的功耗。

  • The Save all power dissipations adds .probe commands to save the power dissipation in each component.

  • 保存所有数字事件数据”会从网表中移除该esave none命令,从而保存数字事件数据。数字事件数据可能会占用大量内存。

  • The Save all digital event data removes the esave none command from the netlist, which causes digital event data to be saved. Digital event data may consume a lot of memory.

不同仿真工具的具体表现可能有所不同。

被动符号值会自动调整,以兼容各种 Spice 模拟器。具体来说:

Passive symbol values are automatically adjusted to be compatible with various Spice simulators. Specifically:

  • μ并且单位前缀分别M被替换为u和。Meg

  • μ and M as unit prefixes are replaced with u and Meg, respectively

  • 单位被移除(例如,4.7kΩ更改为4.7k

  • Units are removed (e.g. 4.7kΩ is changed to 4.7k)

  • RKM 格式的值被重写为 Spice 兼容格式(例如,4u7更改为4.7u)。

  • Values in RKM format are rewritten to be Spice-compatible (e.g. 4u7 is changed to 4.7u)

Spice网表导出器还提供了一种简便的方法,可以使用外部仿真器对生成的网表进行仿真。这对于在不使用KiCad内部ngspice仿真器的情况下运行仿真,或者运行KiCad仿真工具不支持的ngspice仿真选项都非常有用。

The Spice netlist exporter also provides an easy way to simulate the generated netlist with an external simulator. This can be useful for running a simulation without using KiCad’s internal ngspice simulator, or for running an ngspice simulation with options that are not supported by KiCad’s simulator tool.

在文本框中输入外部仿真器的路径,其中%I代表生成的网表。选中“运行外部仿真器”命令框,即可生成网表并自动运行仿真器。

Enter the path to the external simulator in the text box, with %I representing the generated netlist. Check the run external simulator command box to generate the netlist and automatically run the simulator.

spice "%I"必须调整 默认模拟器命令( ),使其指向安装在您的系统上的模拟器。

Spice 仿真器要求仿真命令(例如 `\n` .PROBE.AC`\n`、.TRAN`\n` 等)包含在网表中。原理图中以句点(`.` .)开头的任何文本行都会被包含在网表中。如果一个文本对象包含多行,则只会包含以句点开头的行。

Spice simulators expect simulation commands (.PROBE, .AC, .TRAN, etc.) to be included in the netlist. Any text line included in the schematic diagram starting with a period (.) will be included in the netlist. If a text object contains multiple lines, only the lines beginning with a period will be included.

.include根据原理图中符号的 Spice 模型设置,自动将包含模型库文件的指令添加到网表中。

.include directives for including model library files are automatically added to the netlist based on the Spice model settings for the symbols in the schematic.

香料模型网表格式
Spice网表导出

KiCad还可以将原理图的网表导出为Spice子电路模型,该模型可以包含在单独的Spice仿真中。原理图中的任何层级标签都用作子电路模型的引脚。模型中的每个引脚都带有注释,用于描述引脚的电气方向:

KiCad can also export a netlist of the schematic as a Spice subcircuit model, which can be included in a separate Spice simulation. Any hierarchical labels in the schematic are used as pins for the subcircuit model. Each pin in the model is annotated with a comment describing the pin’s electrical direction:

  • Input层级标签映射到input注释

  • Input hierarchical labels are mapped to an input annotation

  • Output层级标签映射到output注释

  • Output hierarchical labels are mapped to an output annotation

  • Bidirectional层级标签映射到inout注释

  • Bidirectional hierarchical labels are mapped to an inout annotation

  • Tri-state层级标签映射到tristate注释

  • Tri-state hierarchical labels are mapped to a tristate annotation

  • Passive层级标签映射到passive注释

  • Passive hierarchical labels are mapped to a passive annotation

如果选择“以当前图纸为根”,则仅将当前图纸导出到子电路模型。否则,将导出整个原理图图纸。

When the use current sheet as root is selected, only the current sheet is exported to a subcircuit model. Otherwise, the entire schematic sheet is exported.

网表示例

Netlist examples

下面这张图是sallen_keyKiCad 仿真演示中包含的项目的原理图。

Below is the schematic from the sallen_key project included in KiCad’s simulation demos.

sallen_key 演示原理图

该原理图的 KiCad 格式网表如下:

The KiCad format netlist for this schematic is as follows:

(导出(版本“E”)
  (设计
    (来源“/usr/share/kicad/demos/simulation/sallen_key/sallen_key.kicad_sch”)
    (日期“2022年5月1日星期日下午3:14:05 EDT”)
    (工具“Eeschema (6.0.4)”)
    (页(编号“1”)(名称“/”)(邮票“/”)
      (标题栏)
        (标题)
        (公司)
        (修订版)
        (日期)
        (来源“sallen_key.kicad_sch”)
        (注释(编号“1”)(值“”))
        (注释(编号“2”)(值“”))
        (注释(编号“3”)(值“”))
        (注释(编号“4”)(值“”))
        (注释(编号“5”)(值“”))
        (注释(编号“6”)(值“”))
        (注释(编号“7”)(值“”))
        (注释(编号“8”)(值“”))
        (注释(数字“9”)(值“”)))))
  (成分
    (comp (ref "C1")
      (值为“100n”)
      (libsource (lib "sallen_key_schlib") (part "C") (description ""))
      (属性(名称“Sheetname”)(值“”))
      (属性(名称“Sheetfile”)(值“sallen_key.kicad_sch”)
      (sheetpath(names“/”)(tstamps“/”))
      (tstamps "00000000-0000-0000-0000-00005789077d"))
    (comp (ref "C2")
      (值为“100n”)
      (字段)
        (字段(名称“字段名”)“值”)
        (字段(名称“SpiceMapping”)“1 2”)
        (字段(名称“Spice_Primitive”)“C”)
      (libsource (lib "sallen_key_schlib") (part "C") (description ""))
      (属性(名称“字段名”)(值“值”)
      (属性(名称“Spice_Primitive”)(值“C”)
      (属性(名称“SpiceMapping”)(值“1 2”)
      (属性(名称“Sheetname”)(值“”))
      (属性(名称“Sheetfile”)(值“sallen_key.kicad_sch”)
      (sheetpath(names“/”)(tstamps“/”))
      (tstamps "00000000-0000-0000-0000-00005789085b"))
    (comp (ref "R1")
      (值“1k”)
      (字段)
        (字段(名称“字段名”)“值”)
        (字段(名称“SpiceMapping”)“1 2”)
        (字段(名称“Spice_Primitive”)“R”)
      (libsource (lib "sallen_key_schlib") (part "R") (description ""))
      (属性(名称“字段名”)(值“值”)
      (属性(名称“SpiceMapping”)(值“1 2”)
      (属性(名称“Spice_Primitive”)(值“R”)
      (属性(名称“Sheetname”)(值“”))
      (属性(名称“Sheetfile”)(值“sallen_key.kicad_sch”)
      (sheetpath(names“/”)(tstamps“/”))
      (tstamps "00000000-0000-0000-0000-0000578906ff"))
    (comp (ref "R2")
      (值“1k”)
      (字段)
        (字段(名称“字段名”)“值”)
        (字段(名称“SpiceMapping”)“1 2”)
        (字段(名称“Spice_Primitive”)“R”)
      (libsource (lib "sallen_key_schlib") (part "R") (description ""))
      (属性(名称“字段名”)(值“值”)
      (属性(名称“SpiceMapping”)(值“1 2”)
      (属性(名称“Spice_Primitive”)(值“R”)
      (属性(名称“Sheetname”)(值“”))
      (属性(名称“Sheetfile”)(值“sallen_key.kicad_sch”)
      (sheetpath(names“/”)(tstamps“/”))
      (tstamps "00000000-0000-0000-0000-000057890691"))
    (comp (ref "U1")
      (值为“AD8051”)
      (字段)
        (字段(名称“Spice_Lib_File”)“ad8051.lib”)
        (字段(名称“Spice_Model”)“AD8051”)
        (字段(名称“Spice_Netlist_Enabled”)“Y”)
        (字段(名称“Spice_Primitive”)“X”)
      (libsource (lib "sallen_key_schlib") (part "Generic_Opamp") (description ""))
      (属性(名称“Spice_Primitive”)(值“X”)
      (属性(名称“Spice_Model”)(值“AD8051”)
      (属性(名称“Spice_Lib_File”)(值“ad8051.lib”)
      (属性(名称“Spice_Netlist_Enabled”)(值“Y”)
      (属性(名称“Sheetname”)(值“”))
      (属性(名称“Sheetfile”)(值“sallen_key.kicad_sch”)
      (sheetpath(names“/”)(tstamps“/”))
      (tstamps "00000000-0000-0000-0000-00005788ff9f"))
    (comp (ref "V1")
      (值为“AC 1”)
      (libsource (lib "sallen_key_schlib") (part "VSOURCE") (description ""))
      (属性(名称“Sheetname”)(值“”))
      (属性(名称“Sheetfile”)(值“sallen_key.kicad_sch”)
      (sheetpath(names“/”)(tstamps“/”))
      (tstamps "00000000-0000-0000-0000-000057336052"))
    (comp (ref "V2")
      (值为“DC 10”)
      (字段)
        (字段(名称“字段名”)“值”)
        (字段(名称“Spice_Node_Sequence”)“1 2”)
        (字段(名称“Spice_Primitive”)“V”)
      (libsource (lib "sallen_key_schlib") (part "VSOURCE") (description ""))
      (属性(名称“字段名”)(值“值”)
      (属性(名称“Spice_Primitive”)(值“V”)
      (属性(名称“Spice_Node_Sequence”)(值“1 2”)
      (属性(名称“Sheetname”)(值“”))
      (属性(名称“Sheetfile”)(值“sallen_key.kicad_sch”)
      (sheetpath(names“/”)(tstamps“/”))
      (tstamps "00000000-0000-0000-0000-0000578900ba"))
    (comp (ref "V3")
      (值为“DC 10”)
      (字段)
        (字段(名称“字段名”)“值”)
        (字段(名称“Spice_Node_Sequence”)“1 2”)
        (字段(名称“Spice_Primitive”)“V”)
      (libsource (lib "sallen_key_schlib") (part "VSOURCE") (description ""))
      (属性(名称“字段名”)(值“值”)
      (属性(名称“Spice_Primitive”)(值“V”)
      (属性(名称“Spice_Node_Sequence”)(值“1 2”)
      (属性(名称“Sheetname”)(值“”))
      (属性(名称“Sheetfile”)(值“sallen_key.kicad_sch”)
      (sheetpath(names“/”)(tstamps“/”))
      (tstamps "00000000-0000-0000-0000-000057890232"))
  (libparts
    (libpart(lib“sallen_key_schlib”)(“C”部分)
      (脚印)
        (fp“C?”)
        (fp "C_????_*")
        (fp“C_????”)
        (fp“SMD*_c”)
        (fp“电容器*”)
      (字段)
        (字段(名称“参考”)“C”)
        (字段(名称“值”)“C”)
      (别针)
        (引脚(编号“1”)(名称“”)(类型“被动”)
        (引脚(编号“2”)(名称“”)(类型“被动”))))
    (libpart (lib "sallen_key_schlib") (part "Generic_Opamp")
      (字段)
        (字段(名称“参考”)“U”)
        (字段(名称“值”)“Generic_Opamp”)
      (别针)
        (引脚(编号“1”)(名称“+”)(类型“输入”)
        (引脚(编号“2”)(名称“-”)(类型“输入”)
        (引脚(编号“3”)(名称“V+”)(类型“power_in”)
        (引脚(编号“4”)(名称“V-”)(类型“power_in”)
        (引脚(编号“5”)(名称“”)(类型“输出”)))
    (libpart(lib“sallen_key_schlib”)(“R”部分)
      (脚印)
        (fp "R_*")
        (fp "Resistor_*"))
      (字段)
        (字段(名称“参考”)“R”)
        (字段(名称“值”)“R”)
      (别针)
        (引脚(编号“1”)(名称“”)(类型“被动”)
        (引脚(编号“2”)(名称“”)(类型“被动”))))
    (libpart(lib“sallen_key_schlib”)(“VSOURCE”部分)
      (字段)
        (字段(名称“参考”)“V”)
        (字段(名称“值”)“VSOURCE”)
        (字段(名称“字段名”)“值”)
        (字段(名称“Spice_Primitive”)“V”)
        (字段(名称“Spice_Node_Sequence”)“1 2”)
      (别针)
        (引脚(编号“1”)(名称“”)(类型“输入”)
        (引脚(编号“2”)(名称“”)(类型“输入”)))))
  (图书馆)
    (library (logical "sallen_key_schlib")
      (uri“/usr/share/kicad/demos/simulation/sallen_key/sallen_key_schlib.kicad_sym”)))
  (网)
    (net (code "1") (name "/lowpass")
      (节点(引用“C1”)(引脚“1”)(引脚类型“被动”)
      (节点(引用“U1”)(引脚“2”)(引脚功能“-”)(引脚类型“输入”)
      (节点(引用“U1”)(引脚“5”)(引脚类型“输出”))
    (网络(代码“2”)(名称“GND”)
      (节点(参考“C2”)(引脚“2”)(引脚类型“被动”)
      (节点(引用“V1”)(引脚“2”)(引脚类型“输入”)
      (节点(引用“V2”)(引脚“2”)(引脚类型“输入”)
      (节点(引用“V3”)(引脚“1”)(引脚类型“输入”))
    (网络(代码“3”)(名称“网络-(C1-Pad2)”)
      (节点(引用“C1”)(引脚“2”)(引脚类型“被动”)
      (节点(引用“R1”)(引脚“1”)(引脚类型“被动”)
      (节点(引用“R2”)(引脚“2”)(引脚类型“被动”))
    (网络(代码“4”)(名称“网络-(C2-Pad1)”)
      (节点(引用“C2”)(引脚“1”)(引脚类型“被动”)
      (节点(引用“R2”)(引脚“1”)(引脚类型“被动”)
      (节点(引用“U1”)(引脚“1”)(引脚功能“+”)(引脚类型“输入”))
    (网络(代码“5”)(名称“网络-(R1-Pad2)”)
      (节点(引用“R1”)(引脚“2”)(引脚类型“被动”)
      (节点(引用“V1”)(引脚“1”)(引脚类型“输入”))
    (网络(代码“6”)(名称“VDD”)
      (节点(引用“U1”)(引脚“3”)(引脚功能“V+”)(引脚类型“power_in”)
      (节点(引用“V2”)(引脚“1”)(引脚类型“输入”))
    (net (代码“7”) (名称“VSS”)
      (节点(引用“U1”)(引脚“4”)(引脚功能“V-”)(引脚类型“power_in”)
      (节点(引用“V3”)(引脚“2”)(引脚类型“输入”)))))
(export (version "E")
  (design
    (source "/usr/share/kicad/demos/simulation/sallen_key/sallen_key.kicad_sch")
    (date "Sun 01 May 2022 03:14:05 PM EDT")
    (tool "Eeschema (6.0.4)")
    (sheet (number "1") (name "/") (tstamps "/")
      (title_block
        (title)
        (company)
        (rev)
        (date)
        (source "sallen_key.kicad_sch")
        (comment (number "1") (value ""))
        (comment (number "2") (value ""))
        (comment (number "3") (value ""))
        (comment (number "4") (value ""))
        (comment (number "5") (value ""))
        (comment (number "6") (value ""))
        (comment (number "7") (value ""))
        (comment (number "8") (value ""))
        (comment (number "9") (value "")))))
  (components
    (comp (ref "C1")
      (value "100n")
      (libsource (lib "sallen_key_schlib") (part "C") (description ""))
      (property (name "Sheetname") (value ""))
      (property (name "Sheetfile") (value "sallen_key.kicad_sch"))
      (sheetpath (names "/") (tstamps "/"))
      (tstamps "00000000-0000-0000-0000-00005789077d"))
    (comp (ref "C2")
      (value "100n")
      (fields
        (field (name "Fieldname") "Value")
        (field (name "SpiceMapping") "1 2")
        (field (name "Spice_Primitive") "C"))
      (libsource (lib "sallen_key_schlib") (part "C") (description ""))
      (property (name "Fieldname") (value "Value"))
      (property (name "Spice_Primitive") (value "C"))
      (property (name "SpiceMapping") (value "1 2"))
      (property (name "Sheetname") (value ""))
      (property (name "Sheetfile") (value "sallen_key.kicad_sch"))
      (sheetpath (names "/") (tstamps "/"))
      (tstamps "00000000-0000-0000-0000-00005789085b"))
    (comp (ref "R1")
      (value "1k")
      (fields
        (field (name "Fieldname") "Value")
        (field (name "SpiceMapping") "1 2")
        (field (name "Spice_Primitive") "R"))
      (libsource (lib "sallen_key_schlib") (part "R") (description ""))
      (property (name "Fieldname") (value "Value"))
      (property (name "SpiceMapping") (value "1 2"))
      (property (name "Spice_Primitive") (value "R"))
      (property (name "Sheetname") (value ""))
      (property (name "Sheetfile") (value "sallen_key.kicad_sch"))
      (sheetpath (names "/") (tstamps "/"))
      (tstamps "00000000-0000-0000-0000-0000578906ff"))
    (comp (ref "R2")
      (value "1k")
      (fields
        (field (name "Fieldname") "Value")
        (field (name "SpiceMapping") "1 2")
        (field (name "Spice_Primitive") "R"))
      (libsource (lib "sallen_key_schlib") (part "R") (description ""))
      (property (name "Fieldname") (value "Value"))
      (property (name "SpiceMapping") (value "1 2"))
      (property (name "Spice_Primitive") (value "R"))
      (property (name "Sheetname") (value ""))
      (property (name "Sheetfile") (value "sallen_key.kicad_sch"))
      (sheetpath (names "/") (tstamps "/"))
      (tstamps "00000000-0000-0000-0000-000057890691"))
    (comp (ref "U1")
      (value "AD8051")
      (fields
        (field (name "Spice_Lib_File") "ad8051.lib")
        (field (name "Spice_Model") "AD8051")
        (field (name "Spice_Netlist_Enabled") "Y")
        (field (name "Spice_Primitive") "X"))
      (libsource (lib "sallen_key_schlib") (part "Generic_Opamp") (description ""))
      (property (name "Spice_Primitive") (value "X"))
      (property (name "Spice_Model") (value "AD8051"))
      (property (name "Spice_Lib_File") (value "ad8051.lib"))
      (property (name "Spice_Netlist_Enabled") (value "Y"))
      (property (name "Sheetname") (value ""))
      (property (name "Sheetfile") (value "sallen_key.kicad_sch"))
      (sheetpath (names "/") (tstamps "/"))
      (tstamps "00000000-0000-0000-0000-00005788ff9f"))
    (comp (ref "V1")
      (value "AC 1")
      (libsource (lib "sallen_key_schlib") (part "VSOURCE") (description ""))
      (property (name "Sheetname") (value ""))
      (property (name "Sheetfile") (value "sallen_key.kicad_sch"))
      (sheetpath (names "/") (tstamps "/"))
      (tstamps "00000000-0000-0000-0000-000057336052"))
    (comp (ref "V2")
      (value "DC 10")
      (fields
        (field (name "Fieldname") "Value")
        (field (name "Spice_Node_Sequence") "1 2")
        (field (name "Spice_Primitive") "V"))
      (libsource (lib "sallen_key_schlib") (part "VSOURCE") (description ""))
      (property (name "Fieldname") (value "Value"))
      (property (name "Spice_Primitive") (value "V"))
      (property (name "Spice_Node_Sequence") (value "1 2"))
      (property (name "Sheetname") (value ""))
      (property (name "Sheetfile") (value "sallen_key.kicad_sch"))
      (sheetpath (names "/") (tstamps "/"))
      (tstamps "00000000-0000-0000-0000-0000578900ba"))
    (comp (ref "V3")
      (value "DC 10")
      (fields
        (field (name "Fieldname") "Value")
        (field (name "Spice_Node_Sequence") "1 2")
        (field (name "Spice_Primitive") "V"))
      (libsource (lib "sallen_key_schlib") (part "VSOURCE") (description ""))
      (property (name "Fieldname") (value "Value"))
      (property (name "Spice_Primitive") (value "V"))
      (property (name "Spice_Node_Sequence") (value "1 2"))
      (property (name "Sheetname") (value ""))
      (property (name "Sheetfile") (value "sallen_key.kicad_sch"))
      (sheetpath (names "/") (tstamps "/"))
      (tstamps "00000000-0000-0000-0000-000057890232")))
  (libparts
    (libpart (lib "sallen_key_schlib") (part "C")
      (footprints
        (fp "C?")
        (fp "C_????_*")
        (fp "C_????")
        (fp "SMD*_c")
        (fp "Capacitor*"))
      (fields
        (field (name "Reference") "C")
        (field (name "Value") "C"))
      (pins
        (pin (num "1") (name "") (type "passive"))
        (pin (num "2") (name "") (type "passive"))))
    (libpart (lib "sallen_key_schlib") (part "Generic_Opamp")
      (fields
        (field (name "Reference") "U")
        (field (name "Value") "Generic_Opamp"))
      (pins
        (pin (num "1") (name "+") (type "input"))
        (pin (num "2") (name "-") (type "input"))
        (pin (num "3") (name "V+") (type "power_in"))
        (pin (num "4") (name "V-") (type "power_in"))
        (pin (num "5") (name "") (type "output"))))
    (libpart (lib "sallen_key_schlib") (part "R")
      (footprints
        (fp "R_*")
        (fp "Resistor_*"))
      (fields
        (field (name "Reference") "R")
        (field (name "Value") "R"))
      (pins
        (pin (num "1") (name "") (type "passive"))
        (pin (num "2") (name "") (type "passive"))))
    (libpart (lib "sallen_key_schlib") (part "VSOURCE")
      (fields
        (field (name "Reference") "V")
        (field (name "Value") "VSOURCE")
        (field (name "Fieldname") "Value")
        (field (name "Spice_Primitive") "V")
        (field (name "Spice_Node_Sequence") "1 2"))
      (pins
        (pin (num "1") (name "") (type "input"))
        (pin (num "2") (name "") (type "input")))))
  (libraries
    (library (logical "sallen_key_schlib")
      (uri "/usr/share/kicad/demos/simulation/sallen_key/sallen_key_schlib.kicad_sym")))
  (nets
    (net (code "1") (name "/lowpass")
      (node (ref "C1") (pin "1") (pintype "passive"))
      (node (ref "U1") (pin "2") (pinfunction "-") (pintype "input"))
      (node (ref "U1") (pin "5") (pintype "output")))
    (net (code "2") (name "GND")
      (node (ref "C2") (pin "2") (pintype "passive"))
      (node (ref "V1") (pin "2") (pintype "input"))
      (node (ref "V2") (pin "2") (pintype "input"))
      (node (ref "V3") (pin "1") (pintype "input")))
    (net (code "3") (name "Net-(C1-Pad2)")
      (node (ref "C1") (pin "2") (pintype "passive"))
      (node (ref "R1") (pin "1") (pintype "passive"))
      (node (ref "R2") (pin "2") (pintype "passive")))
    (net (code "4") (name "Net-(C2-Pad1)")
      (node (ref "C2") (pin "1") (pintype "passive"))
      (node (ref "R2") (pin "1") (pintype "passive"))
      (node (ref "U1") (pin "1") (pinfunction "+") (pintype "input")))
    (net (code "5") (name "Net-(R1-Pad2)")
      (node (ref "R1") (pin "2") (pintype "passive"))
      (node (ref "V1") (pin "1") (pintype "input")))
    (net (code "6") (name "VDD")
      (node (ref "U1") (pin "3") (pinfunction "V+") (pintype "power_in"))
      (node (ref "V2") (pin "1") (pintype "input")))
    (net (code "7") (name "VSS")
      (node (ref "U1") (pin "4") (pinfunction "V-") (pintype "power_in"))
      (node (ref "V3") (pin "2") (pintype "input")))))

Spice格式的网表如下:

In Spice format, the netlist is as follows:

.title KiCad原理图
.include "ad8051.lib"
XU1 Net-_C2-Pad1_ /低通 VDD VSS /低通 AD8051
C2 Net-_C2-Pad1_ GND 100n
C1 /低通网络-_C1-Pad2_ 100n
R2 网络-_C2-Pad1_ 网络-_C1-Pad2_ 1k
R1 网络-_C1-Pad2_ 网络-_R1-Pad2_ 1k
V1 Net-_R1-Pad2_ GND AC 1
V2 VDD GND DC 10
V3 GND VSS DC 10
.ac dec 10 1 1Meg
。结尾
.title KiCad schematic
.include "ad8051.lib"
XU1 Net-_C2-Pad1_ /lowpass VDD VSS /lowpass AD8051
C2 Net-_C2-Pad1_ GND 100n
C1 /lowpass Net-_C1-Pad2_ 100n
R2 Net-_C2-Pad1_ Net-_C1-Pad2_ 1k
R1 Net-_C1-Pad2_ Net-_R1-Pad2_ 1k
V1 Net-_R1-Pad2_ GND AC 1
V2 VDD GND DC 10
V3 GND VSS DC 10
.ac dec 10 1 1Meg
.end

符号和符号库

Symbols and Symbol Libraries

KiCad 将符号组织成符号库,每个符号库包含一系列符号。原理图中的每个符号都由一个全名唯一标识,该全名由库别名和符号名称组成。例如,标识符 Audio:AD1853指向库AD1853中的符号Audio

KiCad organizes symbols into symbol libraries, which hold collections of symbols. Each symbol in a schematic is uniquely identified by a full name that is composed of a library nickname and a symbol name. For example, the identifier Audio:AD1853 refers to the AD1853 symbol in the Audio library.

管理符号库

Managing symbol libraries

KiCad 使用符号库表将符号库别名映射到磁盘上的底层符号库。KiCad 使用全局符号库表以及每个项目特定的符号库表。要编辑任一符号库表,请使用“首选项”“管理符号库…”选项。

KiCad uses a table of symbol libraries to map a symbol library nickname to an underlying symbol library on disk. Kicad uses a global symbol library table as well as a table specific to each project. To edit either symbol library table, use PreferencesManage Symbol Libraries…​.

sym lib 表 dlg

全局符号库表包含始终可用的库列表,无论当前加载哪个项目,这些库都始终可用。该表保存在sym-lib-tableKiCad 配置文件夹中的文件中。 此文件夹的位置 取决于所使用的操作系统。

The global symbol library table contains the list of libraries that are always available regardless of the currently loaded project. The table is saved in the file sym-lib-table in the KiCad configuration folder. The location of this folder depends on the operating system being used.

项目特定符号库表包含当前加载项目可用的符号库列表。如果存在任何项目特定的符号库,该表将保存在 sym-lib-table项目文件夹中的文件中。

The project specific symbol library table contains the list of libraries that are available specifically for the currently loaded project. If there are any project-specific symbol libraries, the table is saved in the file sym-lib-table in the project folder.

KiCad 的符号库管理系统允许直接使用多种类型的符号库,包括其他非 KiCad EDA 工具的原生格式:

KiCad’s symbol library management system allows directly using many types of symbol libraries, including formats that are native to other non-KiCad EDA tools:

  • KiCad符号库(.kicad_sym文件)

  • KiCad symbol libraries (.kicad_sym files)

  • KiCad 旧版符号库(.lib文件)

  • KiCad Legacy symbol libraries (.lib files)

  • Altium Designer 库(.SchLib.IntLib文件)

  • Altium Designer libraries (.SchLib or .IntLib files)

  • CADSTAR原理图存档库(.lib文件)

  • CADSTAR Schematic Archive libraries (.lib files)

  • KiCad 数据库库配置文件.kicad_dbl文件)

  • KiCad database library configuration files (.kicad_dbl files)

  • Eagle库(.xml文件)

  • Eagle libraries (.xml files)

  • EasyEDA (JLCEDA) 标准版库(.json文件)

  • EasyEDA (JLCEDA) Standard Edition libraries (.json files)

  • EasyEDA (JLCEDA) 专业版库(.elibz、、.epro.zip文件)

  • EasyEDA (JLCEDA) Professional Edition libraries (.elibz, .epro, or .zip files)

  • KiCad HTTP 库配置文件.kicad_httplib文件)

  • KiCad HTTP library configuration files (.kicad_httplib files)

可以使用“迁移库”按钮将非 KiCad 符号库(包括 KiCad Legacy 符号库)迁移到 KiCad.kicad_sym格式(请参阅迁移库部分)。

Non-KiCad symbol libraries, including KiCad Legacy symbol libraries, can be migrated to KiCad .kicad_sym format using the Migrate Libraries button (see the migrating libraries section).

KiCad 仅支持写入 KiCad 原生.kicad_sym格式的符号库。所有其他符号库格式均为只读。要修改非 KiCad 格式的符号库,必须先将其转换为 KiCad 格式。

初始配置

Initial Configuration

首次运行 KiCad 原理图编辑器时,如果sym-lib-tableKiCad 配置文件夹中找不到全局符号表文件,KiCad 将引导用户设置新的符号库表。此过程如上所述您可以随时单击“重置库”重新运行此过程。

The first time the KiCad Schematic Editor is run and the global symbol table file sym-lib-table is not found in the KiCad configuration folder, KiCad will guide the user through setting up a new symbol library table. This process is described above. You can re-run this process at any time by clicking the Reset Libraries.

重置符号库表将永久更改磁盘上的符号库表。

管理表格条目

Managing Table Entries

只有添加到全局符号库表或项目特定符号库表中的符号库才能使用。

Symbol libraries can only be used if they have been added to either the global or project-specific symbol library table.

文件夹图标您可以通过点击按钮并选择库,或者点击按钮并输入库文件路径来添加库 加号图标。所选库将添加到当前打开的库表(全局或项目特定)中。您可以通过选择所需的库条目并点击按钮来删除库 删除图标

Add a library either by clicking the button and selecting a library or clicking the button and typing the path to a library file. The selected library will be added to the currently opened library table (Global or Project Specific). Libraries can be removed by selecting desired library entries and clicking the button.

向上图标上下移动” 向下图标按钮用于在库表格中上下移动选定的库。这不会影响符号编辑器或符号选择器中库的显示顺序。

The and buttons move the selected library up and down in the library table. This does not affect the display order of libraries in the Symbol Editor or Symbol Chooser.

取消选中第一列中的“启用”复选框即可将库设置为非活动状态。非活动状态的库仍保留在库表中,但不会显示在任何库浏览器中,也不会从磁盘加载,这可以缩短加载时间。

Libraries can be made inactive by unchecking the Active checkbox in the first column. Inactive libraries are still in the library table but do not appear in any library browsers and are not loaded from disk, which can reduce loading times.

Shift可以通过单击范围内的第一个库,然后单击范围内的最后一个库来选择一系列库。

A range of libraries can be selected by clicking the first library in the range and then Shift-clicking the last library in the range.

每个库必须有一个唯一的别名:同一个表中不允许出现重复的库别名。但是,全局库表和项目库表之间可以有重复的别名。项目表中的库优先于全局表中同名的库。

Each library must have a unique nickname: duplicate library nicknames are not allowed in the same table. However, nicknames can be duplicated between the global and project library tables. Libraries in the project table take precedence over libraries with the same name in the global table.

库别名不必与库文件名或路径相关。冒号(:)不能用于库别名或符号名称,因为它用作别名和符号之间的分隔符。

Library nicknames do not have to be related to the library filename or path. The colon character (:) cannot be used in library nicknames or symbol names because it is used as a separator between nicknames and symbols.

每个库条目都必须具有有效路径。路径可以定义为绝对路径、相对路径或通过路径变量替换来定义

Each library entry must have a valid path. Paths can be defined as absolute, relative, or by path variable substitution.

要正确读取库文件,必须选择合适的库格式。支持的格式如上所示。只有 KiCad 格式的库文件(.kicad_sym)才能保存。其他符号库格式为只读,必须先转换为 KiCad 格式才能进行修改。

The appropriate library format must be selected in order for the library to be properly read. The supported formats are listed above. Only KiCad format libraries (.kicad_sym) can be saved. Other symbol library formats are read-only and must be converted to KiCad format before you can modify them.

库条目的描述字段为可选字段,用于添加描述信息。目前该选项字段未使用,因此添加选项在加载库时不会生效。

There is an optional description field to add a description of the library entry. The option field is not used at this time so adding options will have no effect when loading libraries.

路径变量替换

Path Variable Substitution

符号库表支持路径变量替换,允许您定义包含库存储位置自定义路径的路径变量。路径变量替换通过${PATH_VAR_NAME}在符号库路径中使用特定语法来实现。

The symbol library tables support path variable substitution, which allows you to define path variables containing custom paths to where your libraries are stored. Path variable substitution is supported by using the syntax ${PATH_VAR_NAME} in the symbol library path.

默认情况下,KiCad 定义了几个路径变量,这些变量在项目管理器文档中有详细说明。路径变量可以在“首选项”“配置路径… ”对话框中进行配置。

By default, KiCad defines several path variables which are described in the project manager documentation. Path variables can be configured in the PreferencesConfigure Paths…​ dialog.

在符号库表中使用路径变量可以允许重新定位库,而不会破坏符号库表,只要在库位置更改时更新路径变量即可。

Using path variables in the symbol library tables allows libraries to be relocated without breaking the symbol library tables, so long as the path variables are updated when the library location changes.

KiCad 会自动将旧版本 KiCad 中的版本化路径变量解析为当前 KiCad 版本中对应变量的值,前提是旧变量本身没有被显式定义。例如,如果没有定义变量, ${KICAD8_SYMBOL_DIR}则会自动解析为。${KICAD9_SYMBOL_DIR}KICAD8_SYMBOL_DIR

${KIPRJMOD}这是一个特殊的路径变量,它始终展开为当前项目目录的绝对路径。${KIPRJMOD}它允许将库存储在项目文件夹中,而无需在项目库表中使用绝对路径。这使得在不破坏项目库表的情况下迁移项目成为可能。

${KIPRJMOD} is a special path variable that always expands to the absolute path of the current project directory. ${KIPRJMOD} allows libraries to be stored in the project folder without having to use an absolute path in the project library table. This makes it possible to relocate projects without breaking their project library tables.

使用模式

Usage Patterns

符号库可以全局定义,也可以专门针对当前加载的项目定义。用户全局符号库表始终可用,并存储在sym-lib-table用户 KiCad 配置文件夹中的文件中。项目特定的符号库表仅对当前打开的项目文件有效。

Symbol libraries can be defined either globally or specifically to the currently loaded project. Symbol libraries defined in the user’s global table are always available and are stored in the sym-lib-table file in the user’s KiCad configuration folder. The project-specific symbol library table is active only for the currently open project file.

每种方法都有其优缺点。将所有库定义在全局表中意味着它们在需要时始终可用。缺点是加载时间会增加。

There are advantages and disadvantages to each method. Defining all libraries in the global table means they will always be available when needed. The disadvantage of this is that load time will increase.

基于项目定义所有符号库意味着您只需拥有项目所需的符号库,从而缩短符号库加载时间。缺点是您必须始终记住为每个项目添加所需的符号库。

Defining all symbol libraries on a project specific basis means that you only have the libraries required for the project which decreases symbol library load times. The disadvantage is that you always have to remember to add each symbol library that you need for every project.

一种使用模式是将常用库全局定义,并将项目所需的库放在项目特定的库表中。定义库的方式没有限制。

One usage pattern would be to define commonly used libraries globally and the libraries only required for the project in the project specific library table. There is no restriction on how to define libraries.

将符号库迁移到 KiCad 格式

Migrating symbol libraries to KiCad format

非 KiCad 格式的库,包括旧版库(.lib文件),均为只读格式。您需要先将其转换为 KiCad 格式(.kicad_sym文件),才能保存更改。

Non-KiCad format libraries, including legacy libraries (.lib files), are read-only. They need to be converted to KiCad format (.kicad_sym files) before you can save changes to them.

与大多数 KiCad 文件一样,新版本的 KiCad 可以打开旧格式的库文件,但旧版本的 KiCad 无法读取新版本 KiCad 保存的文件。

您可以通过在符号库表中选择其他格式的库,然后单击“迁移库”按钮,将其转换为 KiCad 库。您可以通过Ctrl单击或单击来一次性选择并迁移多个库shift

Libraries in other formats can be converted to KiCad libraries by selecting them in the symbol library table and clicking the Migrate Libraries button. Multiple libraries can be selected and migrated at once by Ctrl-clicking or shift-clicking.

也可以通过在符号编辑器中打开库并将其另存为新库来逐个转换库。

Libraries can also be converted one at a time by opening them in the Symbol Editor and saving them as a new library.

遗留项目重新映射

Legacy Project Remapping

加载在符号库表实现之前创建的原理图时,KiCad 会尝试将原理图中的符号库链接重新映射到相应的库表符号。此过程的成功取决于以下几个因素:

When loading a schematic created prior to the symbol library table implementation, KiCad will attempt to remap the symbol library links in the schematic to the appropriate library table symbols. The success of this process is dependent on several factors:

  • 原理图中使用的原始库仍然可用,并且与符号添加到原理图时一样没有变化。

  • the original libraries used in the schematic are still available and unchanged from when the symbol was added to the schematic.

  • 所有救援行动均在发现需要时执行,以创建救援库或更新现有救援库。

  • all rescue operations were performed when detected to create a rescue library or keep the existing rescue library up to date.

  • 项目符号缓存库的完整性未被破坏。

  • the integrity of the project symbol cache library has not been corrupted.

重新映射操作会将所有在重新映射过程中更改的文件备份到项目文件夹下的 rescue-backup 文件夹中。为了以防万一,在重新映射之前务必备份您的项目。

The remapping will make a back up of all the files that are changed during remapping in the rescue-backup folder in the project folder. Always make a back up of your project before remapping just in case something goes wrong.

即使已禁用,救援操作仍会执行,以确保可用于重新映射的正确符号。请勿取消此操作,否则重新映射将无法正确映射原理图符号。任何断开的符号链接都必须手动修复。

The rescue operation is performed even if it has been disabled to ensure the correct symbols are available for remapping. Do not cancel this operation or the remapping will fail to correctly remap schematics symbols. Any broken symbol links will have to be fixed manually.

如果原始库已被移除且未执行恢复操作,则可将缓存库用作最后的恢复库。将缓存库复制到一个新文件名,并使用符号库表实现之前的 KiCad 版本,将新库文件添加到库列表的顶部。

If the original libraries have been removed and the rescue was not performed, the cache library can be used as a recovery library as a last resort. Copy the cache library to a new file name and add the new library file to the top of the library list using a version of KiCad prior to the symbol library table implementation.

创建和编辑符号

Creating and editing symbols

符号是元件的示意图。一个符号由以下部分组成:

A symbol is a schematic representation of a component. A symbol is composed of:

  • 决定符号在示意图中外观的图形元素(线条、圆圈、弧线、文本等)。

  • Graphical items (lines, circles, arcs, text, etc.) that determine how symbol looks in a schematic.

  • 引脚具有图形属性(线、时钟、反相、低电平有效等)和电气属性(输入、输出、双向等),供电气规则检查 (ERC) 工具使用。

  • Pins, which have both graphic properties (line, clock, inverted, low level active, etc.) and electrical properties (input, output, bidirectional, etc.) used by the Electrical Rules Check (ERC) tool.

  • 字段包括参考信息、数值、PCB设计中对应的封装名称等。

  • Fields, such as references, values, corresponding footprint names for PCB design, etc.

符号库由一个或多个符号组成。通常,这些符号按功能、类型和/或制造商进行逻辑分组。每个符号库都是一个单独的文件,扩展名为.synth .kicad_sym

A symbol library is composed of one or more symbols. Generally the symbols are logically grouped by function, type, and/or manufacturer. Each symbol library is a single file with the .kicad_sym extension.

符号可以从同一库中的另一个符号派生而来。派生符号共享基础符号的图形形状和引脚定义,但可以覆盖基础符号的属性字段(值、封装、封装过滤器、数据手册、描述等)。派生符号可用于定义与基础元件类似的符号。例如,74LS00、74HC00 和 7437 符号都可以从 7400 符号派生而来。在早期版本的 KiCad 中,派生符号被称为别名。

Symbols can be derived from another symbol in the same library. Derived symbols share the base symbol’s graphical shape and pin definitions, but can override the base symbol’s property fields (value, footprint, footprint filters, datasheet, description, etc.). Derived symbols can be used to define symbols that are similar to a base part. For example, 74LS00, 74HC00, and 7437 symbols could all be derived from a 7400 symbol. In previous versions of KiCad, derived symbols were referred to as aliases.

符号编辑器概述

Symbol Editor overview

KiCad 提供了一个符号编辑工具,允许您创建库;在库之间添加、编辑、删除或转移符号;将符号导出到文件;以及从文件导入符号。您可以从 KiCad 项目管理器或原理图编辑器启动符号编辑器(工具符号编辑器)。您也可以从原理图中的符号打开符号编辑器 ;这样,您就可以在编辑器中编辑该符号的库副本或原理图副本。

KiCad provides a symbol editing tool that allows you to create libraries; add, edit, delete, or transfer symbols between libraries; export symbols to files; and import symbols from files. The Symbol Editor can be launched from the KiCad Project Manager or from the Schematic Editor (ToolsSymbol Editor). You can also open the Symbol Editor from the a symbol in the schematic; in this way you can edit either the library copy or the schematic copy of that symbol in the editor.

编辑库中的符号版本不会影响已添加到原理图中的该符号的任何副本,直到原理图中的副本从库中更新为止。反之,编辑原理图中的符号版本不会影响库中的符号版本或原理图中该符号的任何其他副本。

一般来说,符号设计流程包括:

In general, the flow for designing a symbol involves:

  • 判断该符号是由一个或多个单元组成。

  • Defining if the symbol is made up of one or more units.

  • 确定该符号是否具有替代的主体样式(也称为德摩根表示法)。

  • Defining if the symbol has an alternate body style (also known as a De Morgan representation).

  • 用线条、矩形、圆形、多边形和文字设计其符号表示。

  • Designing its symbolic representation using lines, rectangles, circles, polygons and text.

  • 通过仔细定义每个引脚的图形元素、名称、编号和电气属性(输入、输出、三态、功率输出等)来添加引脚。

  • Adding pins by carefully defining each pin’s graphical elements, name, number, and electrical property (input, output, tri-state, power output, etc.).

  • 确定该符号是否应源自具有相同图形设计和引脚定义的另一个符号。

  • Determining if the symbol should be derived from another symbol with the same graphical design and pin definition.

  • 添加可选字段,例如 PCB 设计软件使用的封装名称和/或定义其可见性。

  • Adding optional fields such as the name of the footprint used by the PCB design software and/or defining their visibility.

  • 通过添加描述字符串和指向数据表等的链接来记​​录该符号。

  • Documenting the symbol by adding a description string and links to data sheets, etc.

  • 将其保存到所需的库中。

  • Saving it in the desired library.

符号编辑器主窗口如下图所示。它包含三个工具栏,方便用户快速访问常用功能,以及一个符号查看/编辑画布。并非所有命令都显示在工具栏上,但所有命令都可以在菜单中找到。

The Symbol Editor main window is shown below. It has three toolbars for quick access to common features and a symbol viewing/editing canvas. Not all commands are available on the toolbars, but all commands are available in the menus.

除了工具栏之外,左侧还有可折叠面板,分别用于显示符号树、属性管理器和选择过滤器。窗口底部包含一个消息面板,用于显示所选对象的详细信息。

In addition to the toolbars, there are collapsible panels for the symbol tree, Properties Manager, and selection filter on the left. The bottom of the window contains a message panel that shows details about the selected object.

符号编辑器主窗口
顶部工具栏

主工具栏位于主窗口顶部。它包含撤销/重做命令、缩放命令、符号属性对话框以及单位/表示管理控件的按钮。

The main toolbar is at the top of the main window. It has buttons for the undo/redo commands, zoom commands, symbol properties dialogs, and unit/representation management controls.

新符号图标

在选定的库中创建一个新符号。

Create a new symbol in the selected library.

保存图标

保存当前选定的库。库中所有已修改的符号都将被保存。

Save the currently selected library. All modified symbols in the library will be saved.

撤销图标

撤销上次编辑。

Undo last edit.

重做图标

重做上次撤销操作。

Redo last undo.

刷新图标

刷新显示。

Refresh display.

放大图标

放大。

Zoom in.

缩小图标

缩小画面。

Zoom out.

缩放以适应页面图标

缩放以适应显示屏上的符号。

Zoom to fit symbol in display.

放大到选定图标

缩放以适应选定区域。

Zoom to fit selection.

逆时针旋转图标

逆时针旋转。

Rotate counter-clockwise.

顺时针旋转图标

顺时针旋转。

Rotate clockwise.

水平镜像图标

水平镜像。

Mirror horizontally.

垂直镜像图标

垂直镜像。

Mirror vertically.

符号属性图标

编辑当前符号的属性

Edit the current symbol’s properties.

图钉桌图标

在表格界面中编辑符号的引脚。

Edit the symbol’s pins in a tabular interface.

数据表图标

如果已定义,请打开该符号的数据手册。

Open the symbol’s datasheet, if it is defined.

ERC图标

运行符号检查器,测试当前符号是否存在设计错误。

Run the symbol checker to test the current symbol for design errors.

普通车身样式图标

选择标准体样式。如果当前符号没有其他体样式,则该按钮将处于禁用状态。

Select the normal body style. The button is disabled if the current symbol does not have an alternate body style.

备选车身样式图标

选择备选主体样式。如果当前符号没有备选主体样式,则该按钮将处于禁用状态。

Select the alternate body style. The button is disabled if the current symbol does not have an alternate body style.

单位下拉菜单

选择要显示的多单位符号的单位。如果当前符号没有多个单位,则下拉菜单将处于禁用状态。

Select the unit of a multi-unit symbol to display. The drop down control will be disabled if the current symbol does not have multiple units.

同步图钉编辑模式图标

启用同步引脚编辑模式。启用此模式后,所有引脚修改都会同步到所有其他符号单元。引脚编号更改不会同步。对于具有多个可互换单元的符号,此模式会自动启用;对于只有一个单元的符号,则无法启用此模式。

Enable synchronized pin edit mode. When this mode is enabled, any pin modifications are propagated to all other symbol units. Pin number changes are not propagated. This mode is automatically enabled for symbols with multiple interchangeable units and cannot be enabled for symbols with only one unit.

向原理图图标添加符号

在原理图中插入电流符号。

Insert current symbol into the schematic.

左侧工具栏显示控件

左侧工具栏提供了更改符号编辑器中项目显示方式的选项。

The left toolbar provides options to change the display of items in the Symbol Editor.

网格图标

切换网格显示状态。

Toggle grid visibility on and off.

网格覆盖图标

切换启用或禁用针对特定项目的网格覆盖。

Toggle item-specific grid overrides on and off.

英寸单位图标 毫米单位图标 毫米单位图标

将单位设置为英寸、密耳(0.001英寸)或毫米。

Set units to inches, mils (0.001 inch), or millimeters.

光标形状图标

切换全屏光标的开启和关闭状态。

Toggle full screen cursor on and off.

显示引脚类型图标

切换引脚电气类型的显示。

Toggle display of pin electrical types.

显示隐藏的图钉图标

切换显示隐藏(不可见)的图钉。

Toggle display of hidden (invisible) pins.

显示隐藏字段图标

切换显示隐藏(不可见)字段。

Toggle display of hidden (invisible) fields.

符号树图标

切换库和符号树的显示。

Toggle display of library and symbol tree.

符号树图标

切换显示“属性管理器”面板。

Toggle display of Properties Manager panel.

右侧工具栏工具

放置和绘图工具位于右侧工具栏中。

Placement and drawing tools are located in the right toolbar.

光标图标

选择工具。使用选择工具右键单击会打开光标所在对象的上下文菜单。使用选择工具左键单击会在主窗口底部的消息面板中显示光标所在对象的属性。使用选择工具双击左键会打开光标所在对象的属性对话框。

Select tool. Right-clicking with the select tool opens the context menu for the object under the cursor. Left-clicking with the select tool displays the attributes of the object under the cursor in the message panel at the bottom of the main window. Double-left-clicking with the select tool will open the properties dialog for the object under the cursor.

图钉图标

图钉工具。单击鼠标左键添加新图钉

Pin tool. Left-click to add a new pin.

文本图标

图形文本工具。单击鼠标左键添加新的图形文本项

Graphical text tool. Left-click to add a new graphical text item.

文本框图标

图形文本框工具。单击鼠标左键添加新的图形文本框项

Graphical textbox tool. Left-click to add a new graphical textbox item.

添加矩形图标

矩形工具。单击鼠标左键开始绘制 图形矩形的第一个角。再次单击鼠标左键放置矩形的对角。

Rectangle tool. Left-click to begin drawing the first corner of a graphical rectangle. Left-click again to place the opposite corner of the rectangle.

添加圆形图标

圆工具。单击鼠标左键从圆心开始绘制一个新的图形圆。再次单击鼠标左键定义圆的半径。

Circle tool. Left-click to begin drawing a new graphical circle from the center. Left-click again to define the radius of the circle.

添加弧形图标

弧形工具。单击鼠标左键从第一个弧点开始绘制新的弧形图形。再次单击鼠标左键定义第二个弧点。拖动弧心点调整半径。

Arc tool. Left-click to begin drawing a new graphical arc item from the first arc end point. Left-click again to define the second arc end point. Adjust the radius by dragging the arc center point.

添加贝塞尔图标

贝塞尔曲线工具。单击鼠标左键开始绘制新的贝塞尔曲线。首先单击起点,然后单击控制点和终点。拖动这些点来调整曲线。

Bezier curve tool. Left-click to begin drawing a new graphical bezier curve item. First click for the start point, then for the control points and the end point. Adjust the curve by dragging the points.

添加线条图标

连接线工具。单击鼠标左键开始在当前符号中绘制新的图形线项 。单击鼠标左键可添加一条连接线。双击鼠标左键完成线条绘制。

Connected line tool. Left-click to begin drawing a new graphical line item in the current symbol. Left-click for each additional connected line. Double-left-click to complete the line.

添加线条图标

连接线工具。单击鼠标左键开始在当前符号中绘制新的图形线项 。单击鼠标左键可添加一条连接线。双击鼠标左键完成线条绘制。

Connected line tool. Left-click to begin drawing a new graphical line item in the current symbol. Left-click for each additional connected line. Double-left-click to complete the line.

锚图标

锚点工具。单击鼠标左键设置符号的锚点位置。

Anchor tool. Left-click to set the anchor position of the symbol.

删除图标

删除工具。单击鼠标左键可从当前符号中删除对象。

Delete tool. Left-click to delete an object from the current symbol.

浏览、修改和保存符号

Browsing, modifying, and saving symbols

符号树图标按钮用于显示或隐藏可用库列表,您可以从中选择一个活动库。创建新符号时,它将被放置在当前活动库中。

The button displays or hides the list of available libraries, which allows you to select an active library. When a new symbol is created, it will be placed in the active library.

单击符号名称即可在编辑器中打开该符号,将光标悬停在符号名称上即可显示该符号的预览。

Clicking on a symbol name opens that symbol in the editor, and hovering the cursor over the name of a symbol displays a preview of the symbol.

某些符号源自其他符号。派生符号的名称在树状视图中以斜体显示。如果打开一个派生符号,其符号图形将不可编辑,但其符号字段仍可正常编辑。要编辑基础符号及其所有派生符号的图形,请打开基础符号。

修改后,符号可以保存到当前库或其他库中。要将修改后的符号保存到当前库,请单击该 保存图标图标。

After modification, a symbol can be saved in the current library or a different library. To save the modified symbol in the current library, click the icon.

保存修改后的符号时,也会保存同一库中所有其他修改过的符号。

要将符号更改保存到新符号,请单击“文件”“另存为…”。符号可以保存到当前库或其他库(包括新建库),并且可以为符号设置新名称。或者,您可以使用“文件”“另存为…” ,其行为与“另存为”相同,区别在于它会保持原始符号打开状态,而不是切换到新符号。

To save the symbol changes to a new symbol, click FileSave As…​. The symbol can be saved in the current library or a different library (including a new library), and a new name can be set for the symbol. Alternatively, you can use FileSave Copy As…​, which behaves the same as Save As except that the original symbol remains open rather than switching to the new symbol.

要创建仅包含当前符号的新文件,请单击“文件”“导出”“符号…”。此文件将是一个标准符号库文件,其中仅包含一个符号。该库不会添加到您的库表中。

To create a new file containing only the current symbol, click FileExportSymbol…​. This file will be a standard symbol library file which will contain only one symbol. The library will not be added to your library table.

编辑器还可以打开原理图中的符号。要编辑原理图中的符号,请在原理图编辑器中右键单击该符号,然后选择“ 在原理图编辑器中打开”Ctrl+E)。

The editor can also open symbols from the schematic. To edit a symbol from the schematic, right click a symbol in the Schematic Editor and select Open in Schematic Editor (Ctrl+E).

编辑并保存原理图符号副本只会更新原理图中的该符号;不会更新原理图中该符号的其他副本,也不会更改符号的原始库副本。打开符号的原理图副本时,原理图编辑器会显示一个信息栏,警告您库副本不会被修改。您可以单击此信息栏中的链接来打开符号的库版本,或者按 Ctrl+ Shift+E键。

Editing and saving the schematic copy of a symbol will only update that symbol in the schematic; it will not update other copies of that symbol in the schematic, and it will not change the original library copy of the symbol. When you open the schematic copy of a symbol, the Schematic Editor displays an info bar that warns you the library copy will not be modified. You can click the link in this info bar to open the library version of the symbol instead, or press Ctrl+Shift+E.

创建新的符号库

Creating a new symbol library

您可以通过点击“文件”“新建库…”来创建新的符号库。此时,您必须选择将新库添加到全局符号库表还是项目符号库表。全局库表中的库可供所有项目使用,而项目库表中的库仅在当前项目中可用。

You can create a new symbol library by clicking FileNew Library…​. At this point you must choose whether the new library should be added to the global symbol library table or the project symbol library table. Libraries in the global library table will be available to all projects, while libraries in the project library table will only be available in the current project.

符号编辑器新库

选择库表后,您必须为新库选择名称和位置。系统将在指定位置创建一个新的空库。

Following selection of the library table, you must choose a name and location for the new library. A new, empty library will be created at the specified location.

创建新符号

Creating a new symbol

要在当前符号库中创建新符号,请单击该 新符号图标按钮。系统将要求您输入一些符号属性。

To create a new symbol in the current symbol library, click the button. You will be asked for a number of symbol properties.

  • 符号名称

  • A symbol name

  • 可选的基准符号,用于派生新符号。新符号将使用基准符号的图形形状和引脚配置,但派生符号中的其他符号信息可以修改。基准符号必须与新派生符号位于同一库中。

  • An optional base symbol to derive the new symbol from. The new symbol will use the base symbol’s graphical shape and pin configuration, but other symbol information can be modified in the derived symbol. The base symbol must be in the same library as the new derived symbol.

  • 参考指示符前缀(U,,CR)。

  • The reference designator prefix (U, C, R…​).

  • 每个封装的单元数量,以及这些单元是否可以互换(例如,一个 7400 四路 NAND 符号可能有 4 个单元,每个门一个单元)。

  • The number of units per package, and whether those units are interchangeable (for example a 7400 quad NAND symbol could have 4 units, one for each gate).

  • 如果需要另一种车身样式(有时被称为“德摩根等效车型”)。

  • If an alternate body style (sometimes referred to as a "De Morgan equivalent") is desired.

  • 该符号是否为电源符号。电源符号出现在原理图编辑器的“添加电源符号”对话框中,根据其值建立全局网络连接,不能分配封装,并且会从PCB和物料清单中排除。

  • Whether the symbol is a power symbol. Power symbols appear in the Add Power Symbol dialog in the Schematic editor, make global net connections based on their value, cannot be assigned a footprint, and are excluded from the PCB and bill of materials.

  • 是否应将该符号从物料清单中排除。

  • Whether the symbol should be excluded from the bill of materials.

  • 是否应将该符号从PCB中排除。

  • Whether the symbol should be excluded from the PCB.

此外,还有几种图形选项。

There are also several graphical options.

  • 每个引脚末端与其引脚名称之间的偏移量。

  • The offset between the end of each pin and its pin name.

  • 是否显示密码和密码名称。

  • Whether the pin number and pin name should be displayed.

  • 引脚名称应该显示在引脚旁边,还是显示在符号主体内部引脚的末端。

  • Whether the pin names should be displayed alongside the pins or at the ends of the pins inside the symbol body.

这些属性也可以稍后在“符号属性”窗口中进行更改。

These properties can also be changed later in the Symbol Properties window.

新符号属性

将使用上述属性创建一个新符号,并在编辑器中显示如下。

A new symbol will be created using the properties above and will appear in the editor as shown below.

新创建的符号

中心的蓝色十字是符号锚点,它指定了符号的原点,即坐标 (0, 0)。可以通过选择按钮锚图标并单击新的所需锚点位置来重新定位锚点。

The blue cross in the center is the symbol anchor, which specifies the symbol origin i.e. the coordinates (0, 0). The anchor can be repositioned by selecting the button and clicking on the new desired anchor position.

编辑符号属性

Editing Symbol Properties

符号属性在创建符号时设置,但可以随时修改。要更改符号属性,请单击按钮 符号属性图标显示“符号属性”对话框。您也可以双击编辑画布中的空白区域。

Symbol properties are set when the symbol is created but they can be modified at any point. To change the symbol properties, click on the button to show the Symbol Properties dialog. You can also double click an empty spot in the editing canvas.

符号属性

设置单元数量并检查 所有单元是否可互换以及是否具有替代主体样式(如适用)非常重要,因为这些设置会影响引脚和图形如何添加到每个符号单元。

It is important to set the number of units and check all units are interchangeable and has alternate body style, as applicable, because these settings affect how pins and graphics are added to each symbol unit.

如果在符号中添加引脚后更改每个包装单元的数量,则需要额外添加引脚和图形以匹配新增单元。如果这些属性最初设置正确,则引脚和图形会自动添加到每个单元。不过,您可以随时修改这些属性。

If you change the number of units per package after adding the pins to the symbol, you will need to do extra work to add pins and graphics for the additional units. The pins and graphics would have been automatically added to each unit had these properties been correctly set initially. Nevertheless, it is possible to modify these properties at any time.

“显示引脚编号”“显示引脚名称”图形选项定义了引脚编号和引脚名称文本的可见性。“将引脚名称放置在内部”选项定义了引脚名称相对于引脚本体的位置。如果选中此选项,引脚名称将显示在符号轮廓内。在这种情况下,“引脚名称位置偏移”属性定义了文本相对于引脚本体端的偏移量。通常,1 0.020.051 英寸之间的值比较合理。

The graphic options Show pin number and Show pin name define the visibility of the pin number and pin name text. The option Place pin names inside defines the pin name position relative to the pin body. The pin names will be displayed inside the symbol outline if the option is checked. In this case the Pin Name Position Offset property defines the shift of the text away from the body end of the pin. A value from 0.02 to 0.05 inches is usually reasonable.

下图显示了一个符号,其中“在符号内放置引脚名称” 选项未选中。请注意名称和引脚编号的位置。

The example below shows a symbol with the Place pin name inside option unchecked. Notice the position of the names and pin numbers.

将图钉名称放在未选中的位置
符号名称和关键词

符号名称是符号在库中的名称。符号由库名称和符号名称组合而成。

Symbol name is the symbol’s name in the library. Symbols are identified by a combination of the library and symbol name.

在之前的 KiCad 版本中,符号名称与Value字段是关联的。此关联已在 KiCad 7.0 及更高版本中移除。

In previous versions of KiCad, the symbol name was linked to the Value field. This link is removed in KiCad 7.0 and later.

关键词应包含与组件相关的其他术语。关键词主要用于与符号名称和字段结合使用 Description以便在符号选择器和符号编辑器中搜索符号。在符号选择器中选择符号时,这三项也会显示。

The keywords should contain additional terms related to the component. Keywords are primarily used, in combination with the symbol name and the Description field, for searching for the symbol in the Symbol Chooser and the Symbol Editor. Those three items are also displayed when you select a symbol in the Symbol Chooser.

符号场

Symbol Fields

符号包含多个字段,这些字段是命名值,其中包含与符号相关的信息。字段可以显示在原理图上,也可以隐藏,仅在符号属性中显示。某些字段对 KiCad 具有特殊含义:例如,Reference它们Footprint对于创建 PCB 至关重要。其他字段可能包含对设计很重要但 KiCad 无法识别的信息,例如零件的价格或库存信息。

Symbols contain multiple fields, which are named values containing information related to the symbol. Fields can be displayed on the schematic or hidden and only shown in the symbol’s properties. Some fields have special meaning to KiCad: Reference and Footprint are both critical for creating a PCB, for example. Other fields may contain information that is important for a design but is not interpreted by KiCad, like pricing or stock information for a part.

当库符号添加到原理图时,其中定义的任何字段都会包含在该符号中。您也可以在原理图中向符号添加新字段。无论这些字段是否存在于库符号中,都可以在原理图中逐个编辑这些字段。它们也会被传递到 PCB 中与该符号对应的封装上。

Any fields defined in a library symbol will be included in the symbol when it is added to a schematic. You can also add new fields to symbols in the schematic. Whether they are in the library symbol or not, these fields can then be edited on a per-symbol basis in the schematic. They are also transferred to the symbol’s corresponding footprint in the PCB.

符号字段与图形文本不同。除了可以命名之外,字段还可以在原理图中移动和编辑,而符号文本只能在符号编辑器中编辑。

所有库符号都定义了五个默认字段:Reference`<ref>`、 `<ref> ` Value、 `<ref>`、`<ref>` 和`<ref> `,这些字段会在创建符号时自动添加。这些默认字段无法删除。只有 `<ref> ` 字段必须赋值:库符号的 `<ref>` 字段的内容将用作符号添加到原理图时的参考标识符前缀。在原理图中,符号的 `<ref>`字段包含完整的参考标识符。FootprintDatasheetDescriptionReferenceReferenceReference

All library symbols are defined with five default fields: Reference, Value, Footprint, Datasheet, and Description, which are added whenever a symbol is created. These default fields cannot be deleted. Only the Reference field is required to have a value: the contents of a library symbol’s Reference field is used as the reference designator prefix when the symbol is added to a schematic. In the schematic, the symbol’s Reference field contains the entire reference designator.

如果使用该Footprint字段,则其中包含对符号封装的引用。格式为LIBNAME:FOOTPRINTNAME,其中LIBNAME是封装库表中封装库的名称(请参阅 PCB 编辑器手册中的“封装库表”FOOTPRINTNAME部分),是库中封装的名称LIBNAME

The Footprint field, if used, contains a reference to a footprint for the symbol. The format is LIBNAME:FOOTPRINTNAME, where LIBNAME is the name of the footprint library in the footprint library table (see the Footprint Library Table section in the PCB Editor manual) and FOOTPRINTNAME is the name of the footprint in the library LIBNAME.

Description字段可以包含描述符号的文本,例如组件功能、显著特征和封装选项。在符号选择器或符号编辑器中搜索符号时,会使用此字段中的文本以及符号名称和关键字。在 KiCad 8.0 版本之前,这是一个独立的属性(与符号名称和关键字一样),而不是符号字段。

The Description field can contain text describing the symbol such as the component function, distinguishing features, and package options. Together with the symbol’s name and keywords, text in this field is used when searching for symbols in the Symbol Chooser or Symbol Editor. Before KiCad version 8.0, this was a dedicated property (like the symbol name and keywords) rather than a symbol field.

库中定义的符号通常只包含这五个默认字段。虽然可以向库符号添加其他字段,例如供应商、零件编号、单价等,但通常需要在原理图编辑器中完成此操作,以便将这些附加字段添加到原理图中的每个符号,而不仅仅是同一类型的符号。

Symbols defined in libraries are typically defined with only these five default fields. Additional fields such as vendor, part number, unit cost, etc. can be added to library symbols but generally this is done in the schematic editor so the additional fields can be added to every symbol in the schematic, not just all symbols of one type.

创建额外的空符号字段的便捷方法是使用定义字段名称模板。字段名称模板定义了空字段,这些字段会在符号插入原理图时添加到该符号。字段名称模板可以在“原理图编辑器首选项”中全局定义(适用于所有原理图),也可以在“原理图设置”对话框中局部定义(特定于每个项目)。
如果要管理符号字段中的大量组件数据,请考虑使用数据库库

要编辑现有符号字段,双击该字段,选中它或将鼠标悬停E在字段文本上并按 ,或者右键单击字段文本并选择“属性…”

To edit an existing symbol field, double-click the field, select it or hover and press E, or right-click on the field text and select Properties…​.

要添加新字段、删除可选字段或编辑现有字段,请使用 组件属性图标 主工具栏上的图标打开“符号属性”对话框。字段可以任意命名,但以 `_` 开头的名称ki_(例如 ` ki_description_`)已被 KiCad 保留,不应用于用户字段。

To add new fields, delete optional fields, or edit existing fields, use the icon on the main tool bar to open the Symbol Properties dialog. Fields can be arbitrarily named, but names starting with ki_, e.g. ki_description, are reserved by KiCad and should not be used for user fields.

字段具有多个属性,每个属性都以列的形式显示在属性网格中。并非所有列都默认显示;可以通过右键单击网格标题,然后从菜单中选择或取消选择列来显示或隐藏列。

Fields have a number of properties, each of which is shown as a column in the properties grid. Not all columns are shown by default; columns can be shown or hidden by right clicking on the grid header and selecting or deselecting columns from the menu.

足迹过滤器

Footprint Filters

“封装筛选器”选项卡用于定义哪些封装适合与符号一起使用。这些筛选器可以应用于“封装分配”工具,以便仅显示每个符号适用的封装。

The footprint filters tab is used to define which footprints are appropriate to use with the symbol. The filters can be applied in the Footprint Assignment tool so that only appropriate footprints are displayed for each symbol.

可以定义多个封装筛选条件。符合任一筛选条件的封装将显示;如果未定义任何筛选条件,则将显示所有封装。

Multiple footprint filters can be defined. Footprints that match any of the filters will be displayed; if no filters are defined, then all footprints will be displayed.

过滤器可以使用通配符:*`\n` 匹配任意数量的字符,包括零个字符;`\n`?匹配零个或一个字符。例如, `\n`SOIC-* 将匹配 ` SOIC-8_3.9x4.9mm_P1.27mm\n` 以及任何其他以 `\n` 开头的足迹SOIC-。过滤器 `\n`也 SOT?23匹配 `\n` 。SOT23SOT-23

Filters can use wildcards: * matches any number of characters, including zero, and ? matches zero or one characters. For example, SOIC-* would match the SOIC-8_3.9x4.9mm_P1.27mm footprint as well as any other footprint beginning with SOIC-. The filter SOT?23 matches SOT23 as well as SOT-23.

足迹过滤器

嵌入文件

Embedding files

外部文件可以嵌入到符号中。嵌入文件会将文件的副本存储在符号内部。这样,符号就可以引用嵌入的文件副本,而不是外部文件本身,从而使符号更具可移植性,因为它不再依赖于外部文件,尽管符号库的文件大小也会因此增加。在符号中,这对于嵌入数据手册和SPICE 模型尤其有用。当符号添加到原理图时,嵌入在符号中的文件会被去重:如果一个文件嵌入在符号中,并且该符号的多个实例被添加到原理图中,则只会嵌入一个文件副本,并且所有原理图实例都将引用同一个嵌入的文件。嵌入在符号中的文件不能在父原理图中被引用。有关文件嵌入的更多详细信息,请参阅 原理图设置文档

External files can be embedded within a symbol. Embedding a file stores a copy of the file inside the symbol. The symbol can then refer to the embedded copy of the file instead of the external file, which makes the symbol more portable as it doesn’t rely on an external file, although the symbol library’s filesize is increased as a result. In symbols this is especially useful for embedding datasheets and SPICE models. Files embedded in a symbol are deduplicated when the symbol is added to a schematic: if a file is embedded in a symbol, and multiple instances of that symbol are added to the schematic, only one copy of the file will be embedded, and all of the schematic instances will refer to the same embedded file. Files embedded in a symbol cannot be referred to in the parent schematic. File embedding is explained in more detail in the Schematic Setup documentation.

符号嵌入文件
您可以将数据手册或 SPICE 模型添加到符号中,并一步完成嵌入。为此,请在“符号属性”对话框中浏览数据手册,或在 SPICE 模型编辑器中浏览 SPICE 模型,并在选择文件时选中文件浏览器中的“嵌入文件” 复选框。这样即可嵌入文件,并自动使用嵌入的引用作为文件路径,而不是外部文件的路径。

符号单元和备选车身样式

Symbol Units and Alternate Body Styles

符号可以包含多个封装单元,每个单元的图形和引脚配置各不相同。这通常用于逻辑门、运算放大器或其他在单个封装内包含多个子单元的元件。符号还可以有两种样式:标准符号和替代符号,后者通常被称为“德摩根等效符号”。

Symbols can have more than one unit per package, each with different graphics and pin configurations. This is often used for logic gates, opamps, or other components that have multiple subunits within one physical package. Symbols can also have up to two body styles, a standard symbol and an alternate symbol often referred to as a "De Morgan equivalent".

例如,考虑一个带有两个开关的继电器,它可以设计成一个符号,该符号包含一种封装样式和三个不同的单元:线圈、开关 1 和开关 2。设计一个包含多个单元和/或多种封装样式的符号非常灵活。引脚或封装符号元素可以是所有单元通用的,也可以是特定于某个单元的,或者它们也可以是两种符号表示方式通用的,因此特定于某个符号表示方式。

For example, consider a relay with two switches, which can be designed as a symbol with one body style and three different units: a coil, switch 1, and switch 2. Designing a symbol with multiple units per package and/or alternate body styles is very flexible. A pin or a body symbol item can be common to all units or specific to a given unit or they can be common to both symbolic representation so are specific to a given symbol representation.

默认情况下,图钉与特定单元和车身样式相关。如果某个图钉适用于所有单元或所有车身样式,则无论使用多少个单元或车身样式,都只需创建一次。车身样式图形和文本也是如此,它们可能适用于所有单元,但通常是特定于每个车身样式的。

By default, pins are specific to a unit and body style. When a pin is common to all units or all body styles, it only needs to be created once, no mattery how many units or body styles are used. This is also the case for the body style graphic shapes and text, which may be common to each unit, but typically are specific to each body style.

要向符号添加其他单位,请在“符号属性”对话框中将“单位数量Unit A”属性设置为相应的数字。默认情况下,符号单位的名称为“ 1”、 “2”等,但您可以使用“编辑”“设置单位显示名称…”Unit B为当前单位设置任意名称。

To add additional units to a symbol, set the Number of Units property to the appropriate number in the Symbol Properties dialog. By default, symbol units are named Unit A, Unit B, etc., but you can set an arbitrary name for the current unit using EditSet Unit Display Name…​.

使用单元选择下拉菜单 单位选择下拉菜单选择要编辑的单位。

Use the unit selection dropdown to select the unit you wish to edit.

要添加备用车身样式,请 在“符号属性”对话框中设置“具有备用车身样式 (De Morgan)”属性。

To add an alternate body style, set the Has alternate body style (De Morgan) property in the Symbol Properties dialog.

如果符号定义了备选样式,则一次只能选择一种样式进行编辑。要编辑常规表示形式,请单击普通表示图标图标。要编辑备选表示形式,请单击 替代表示图标图标。

If the symbol has an alternate body style defined, one body style must be selected for editing at a time. To edit the normal representation, click the icon. To edit the alternate representation, click on the icon.

点击图标即可启用 同步引脚编辑模式同步引脚编辑模式图标。在此模式下,引脚修改会在符号单元之间同步;在一个单元中所做的更改也会反映在其他单元中。禁用此模式后,在一个单元中所做的引脚更改不会影响其他单元。选中“所有单元均可互换”时,此模式会自动启用,但也可以禁用。如果未选中“所有单元均可互换” 或符号只有一个单元, 则无法启用此模式。
包含多个不可互换单元的符号示例

例如,考虑一个具有多个不可互换单元的符号,例如每个封装包含 3 个单元的继电器:线圈、开关 1 和开关 2。

For an example of a symbol with multiple units that are not interchangeable, consider a relay with 3 units per package: a coil, switch 1, and switch 2.

这三个单位并不完全相同,因此应在“符号属性”对话框中取消选中“所有单位均可互换”选项。或者,也可以在最初创建符号时指定此选项。

The three units are not all the same, so All units are interchangeable should be deselected in the Symbol Properties dialog. Alternatively, this option could have been specified when the symbol was initially created.

取消选中“所有单位均可互换”复选框
A单元
继电器单元 A
B单元
继电器单元 B
C单元
继电器单元 C

A 单元的符号和引脚布局与 B 单元和 C 单元不同,因此这些单元不能互换。

Unit A does not have the same symbol and pin layout as Units B and C, so the units are not interchangeable.

符号图形

Symbol Graphics

图形元素用于创建符号的视觉表示,不包含任何电气连接信息。您可以使用右侧工具栏上的按钮绘制新的图形形状。以下类型的对象可用:

Graphical elements create the visual representation of a symbol and contain no electrical connection information. You can draw new graphic shapes using the buttons on the right toolbar. The following types of objects are available:

  • 由起点和终点定义的线(线条图标)和多边形( )。多边形图标

  • Lines () and polygons () defined by start and end points.

  • 矩形图标由两个对角定义的矩形( )。

  • Rectangles () defined by two diagonal corners.

  • 圆形图标由圆心和半径定义的圆( )。

  • Circles () defined by the center and radius.

  • 弧(弧形图标)由弧的起点、终点和圆心定义。

  • Arcs () defined by the starting and ending point of the arc and its center.

  • 图形文本(文本图标)和文本框(文本框图标),即使符号镜像翻转,也会自动调整方向以确保可读性。请注意,图形文本项与符号字段不同。

  • Graphical text () and textboxes (), which is automatically oriented to be readable, even when the symbol is mirrored. Note that graphic text items are not the same as symbol fields.

每个图形元素(线、弧、圆等)都可以定义为所有单元和/或车身样式共有的,或者特定于某个给定的单元和/或车身样式。

Each graphic item (line, arc, circle, etc.) can be defined as common to all units and/or body styles or specific to a given unit and/or body style.

右键单击元素即可快速访问元素选项,显示所选元素的上下文菜单。您也可以双击元素来修改其属性,或使用“属性管理器”面板编辑其属性。

Element options can be quickly accessed by right-clicking on the element to display the context menu for the selected element. You can also double-left-click on an element to modify its properties, or edit its properties using the Properties Manager panel.

下面显示的是多边形元素的属性对话框。

Below is the properties dialog for a polygon element.

图形线条属性

图形元素的属性包括:

The properties of a graphic element are:

  • 边框决定是否绘制形状的轮廓。

  • Border determines whether the the shape’s outline should be drawn.

  • 宽度颜色分别定义边框的线条宽度和颜色。边框宽度0使用原理图的默认符号线条宽度。样式 决定边框的线条样式(实线、虚线、点线等)。

  • Width and color define the line width and color of the border. A border width of 0 uses the schematic’s default symbol line width. Style determines the line style of the border (solid, dashed, dotted, etc.).

  • 填充样式决定图形元素定义的形状是填充还是不填充。填充颜色可以是颜色主题的轮廓颜色、背景颜色或自定义颜色。

  • Fill Style determines if the shape defined by the graphical element is to be drawn unfilled or filled. The fill color can be the color theme’s body outline color, body background color, or a custom color.

  • 符号中所有单元的通用属性决定了对于每个包装中包含多个单元的符号,图形元素是为每个单元绘制,还是仅为当前单元绘制。

  • Common to all units in symbol determines if the graphical element is drawn for each unit in symbol with more than one unit per package or if the graphical element is only drawn for the current unit.

  • 所有车身样式通用(De Morgan)决定了图形元素是为具有替代车身样式的符号中的每个符号表示绘制,还是仅为当前车身样式绘制。

  • Common to all body styles (De Morgan) determines if the graphical element is drawn for each symbolic representation in symbols with an alternate body style or if the graphical element is only drawn for the current body style.

  • “符号编辑器专用”设置使该形状仅在符号编辑器中编辑符号时可见。将符号添加到原理图时,该形状将被隐藏。

  • Private to Symbol Editor causes the shape to be visible only when the symbol is edited in the Symbol Editor. The shape will be hidden when the symbol is added to a schematic.

符号别针

Symbol Pins

点击按钮即可创建并插入引脚 图钉图标。双击引脚即可编辑其属性。您还可以删除或移动已添加的引脚。创建引脚时务必谨慎,因为任何错误都会对PCB设计产生影响。

You can create and insert a pin by clicking on the button. Pin properties can be edited by double clicking on the pin. You can also delete or move pins that you have already added. Pins must be created carefully, because any error will have consequences on the PCB design.

引脚由其图形表示、名称和编号定义。引脚名称和编号可以包含字母、数字和符号,但不能包含空格。为了使电气规则检查 (ERC) 工具有效,还必须正确定义引脚的电气类型(输入、输出、三态等)。如果未正确定义此类型,则原理图 ERC 检查结果可能无效。

A pin is defined by its graphical representation, its name, and its number. The pin’s name and number can contain letters, numbers, and symbols, but not spaces. For the Electrical Rules Check (ERC) tool to be useful, the pin’s electrical type (input, output, tri-state…​) must also be defined correctly. If this type is not defined properly, the schematic ERC check results may be invalid.

重要提示:

Important notes:

  • 符号引脚与封装焊盘通过编号进行匹配。符号中的引脚编号必须与封装中对应的焊盘编号一致。

  • Symbol pins are matched to footprint pads by number. The pin number in the symbol must match the corresponding pad number in the footprint.

  • PIN 码名称和数字中请勿使用空格。空格将自动替换为下划线 ( _)。

  • Do not use spaces in pin names and numbers. Spaces will be automatically replaced with underscores (_).

  • 要定义一个带有反转信号(上横线)的引脚名称,请使用 ~波浪号(~)字符,后跟用花括号括起来的要反转的文本。例如,~{FO}O将显示为FO O。

  • To define a pin name with an inverted signal (overbar) use the ~ (tilde) character followed by the text to invert in braces. For example ~{FO}O would display FO O.

  • 如果引脚名称为空,则该引脚被视为未命名引脚。

  • If the pin name is empty, the pin is considered unnamed.

  • 引脚名称可以在符号中重复出现。

  • Pin names can be repeated in a symbol.

  • 密码必须是唯一的(使用符号表示)。

  • Pin numbers must be unique in a symbol.

引脚属性
引脚属性

引脚属性对话框允许您编辑引脚的所有特性。创建引脚或双击现有引脚时,此对话框会自动弹出。您可以通过此对话框修改以下内容:

The pin properties dialog allows you to edit all of the characteristics of a pin. This dialog pops up automatically when you create a pin or when double-clicking on an existing pin. This dialog allows you to modify:

  • 引脚名称和字体大小。

  • The pin name and text size.

  • 密码和字体大小。

  • The pin number and text size.

  • 引脚长度。

  • The pin length.

  • 引脚的电气类型和图形样式。

  • The pin electrical type and graphical style.

  • 单位及候补代表成员资格。

  • Unit and alternate representation membership.

  • 别针可见性。

  • Pin visibility.

  • 其他引脚定义

  • Alternate pin definitions.

图钉图形样式

下图展示了不同的引脚图形样式。这些样式仅为图形上的差异,并不影响引脚的电气类型。

The different pin graphic styles are shown in the figure below. These styles are purely graphical and do not affect the pin’s electrical type.

图钉图形样式
引脚电气类型

符号中的每个引脚都有一个电气类型,例如输入、输出或三态。

Each pin in a symbol has an electrical type, such as input, output, or tri-state.

图钉图形样式

对于原理图ERC工具而言,选择正确的电气类型至关重要。ERC会检查引脚连接是否正确,例如确保输入引脚已驱动,并且电源输入端从合适的电源获得电力。

Choosing the correct electrical type is important for the schematic ERC tool. ERC will check that pins are connected appropriately, for example ensuring that input pins are driven and power inputs receive power from an appropriate source.

您可以使用原理图编辑器中的引脚冲突映射表来配置哪些引脚类型可以连接,哪些引脚类型会发生冲突。默认的引脚冲突设置简述如下。更多信息,请参阅 ERC 文档

You can use the Pin Conflicts Map in the schematic editor to configure which pin types are allowed to connect and which will conflict. The default Pin Conflicts settings are briefly explained below. For more information, see the ERC documentation.

此外,某些引脚类型在ERC规则之外还有特殊行为。在路由器中,对应于空闲引脚的焊盘可以连接到任何其他网络的铜箔而不会导致DRC错误;并且,对应于单个未连接引脚的多个焊盘在电路板上无需彼此连接。

Additionally, some pin types have special behavior outside of ERC. In the router, pads corresponding to a free pin can be connected to copper of any other net without causing a DRC error, and multiple pads corresponding to a single unconnected pin do not need to be connected to each other in the board.

能够实现最佳 ERC 引脚冲突检查行为的引脚类型并不总是与引脚的概念引脚类型相同。选择引脚类型时,应考虑该类型将如何与其他连接引脚的引脚类型交互,以及这种交互是否会产生所需的 ERC 行为。例如,一个模拟控制引脚会产生电流并检测该电流流经外部电阻器时产生的电压。由于该引脚检测的是外部提供的电压,因此可以将其视为输入引脚。然而,在电路原理图中,该引脚将连接到电阻引脚(被动引脚),而不是输出引脚。如果该引脚未连接到输出引脚,则不应出现 ERC 冲突;事实上,如果该引脚连接到另一个输出引脚,则应该出现 ERC 冲突 因为该引脚会在一个已被驱动的网络上提供电流。因此,即使该引脚正在检测电压并且可以被视为输入引脚,它也应该具有输出引脚类型。

引脚类型

Pin Type

描述

Description

输入

Input

一个专用于输入的引脚。默认的引脚冲突设置允许输入引脚连接到大多数其他类型的引脚。此外,如果输入引脚未被驱动(即未连接到输出、双向、三态、功率输出或被动类型的引脚),则会产生 ERC 违规。

A pin which is exclusively an input. The default Pin Conflicts settings allow input pins to connect to most other types of pin. Also, an ERC violation will be produced if an input pin is not driven, i.e. it is not connected to a pin with type output, bidirectional, tristate, power output, or passive.

输出

Output

一个仅用作输出的引脚。默认的引脚冲突设置允许输出引脚连接到大多数非输出类型的引脚。

A pin which is exclusively an output. The default Pin Conflicts settings allow output pins to connect to most types of pin that aren’t also outputs.

双向

Bidirectional

既可作为输入也可作为输出的引脚,例如微控制器数据总线引脚。默认的引脚冲突设置允许双向引脚连接到大多数其他类型的引脚,但与输入引脚相比,限制略多一些。

A pin that can be either an input or an output, such as a microcontroller data bus pin. The default Pin Conflicts settings allow bidirectional pins to connect to most other types of pins, though there are a few more restrictions than with input pins.

三州

Tri-state

三态输出引脚(高电平、低电平或高阻抗)。默认的引脚冲突设置允许三态引脚连接到大多数其他类型的引脚,但当它们连接到大多数类型的输出或电源引脚时,系统会发出警告。

A three state output pin (high, low, or high impedance). The default Pin Conflicts settings allow tri-state pins to connect to most other types of pins, but warnings are generated when they are connected to most types of output or power pins.

被动的

Passive

未连接到有源电子元件的引脚,例如电阻器或连接器上的引脚。默认的引脚冲突设置允许无源引脚连接到大多数其他类型的引脚。

A pin that is not connected to active electronics, for example pins on a resistor or connector. The default Pin Conflicts settings allow passive pins to connect to most other types of pin.

自由的

Free

不影响设备电气功能的引脚。这些引脚通常是封装引脚,内部未与芯片连接。默认的引脚冲突设置允许空闲引脚连接到大多数其他类型的引脚。

A pin that does not electrically affect the operation of the device. These pins typically represent package leads that are not internally connected to the chip. The default Pin Conflicts settings allow free pins to connect to most other types of pin.

在 PCB 编辑器中,与空闲引脚对应的焊盘可以连接到任何其他网络的铜箔,而不会引起 DRC 错误。

In the PCB editor, pads corresponding to free pins can be connected to copper of any other net without causing a DRC error.

未指定

Unspecified

引脚类型未指定。在默认的引脚冲突设置下,当未指定类型的引脚连接到大多数其他类型的引脚时,ERC 会生成警告。

A pin which has an unspecified type. With the default Pin Conflicts settings, ERC generates warnings when unspecified pins are connected to most other types of pins.

电源输入

Power input

为设备供电的引脚。默认的引脚冲突设置允许电源输入引脚连接到大多数其他类型的引脚。但是,未连接到电源输出引脚的电源输入引脚会产生 ERC 违规。

A pin that powers the device. The default Pin Conflicts settings allow power input pins to connect to most other pin types. However, power input pins that are not connected to a power output pin generate an ERC violation.

此外,标记为不可见的电源输入引脚会自动连接到与其引脚名称相同的网络。此行为主要针对旧项目,不建议在新设计中使用。 有关更多信息,请参阅“隐藏电源引脚”部分。

Additionally, power input pins that are marked invisible are automatically connected to the net with the same name as the pin. This behavior is supported primarily for legacy projects and is not recommended for new designs. See the Hidden Power Pin section for more information.

功率输出

Power output

为其他引脚供电的引脚,例如稳压器输出引脚。默认的引脚冲突设置允许电源输出引脚连接到大多数类型的输入引脚,但不允许连接到输出引脚。

A pin that provides power to other pins, such as a regulator output. The default Pin Conflicts settings allow power output pins to connect to most types of input pins, but not output pins.

开放式集电极

Open collector

开集电极逻辑输出。默认的引脚冲突设置允许开集电极引脚连接到大多数输入引脚和其他开集电极引脚,但不能连接到大多数其他类型的输出。

An open collector logic output. The default Pin Conflicts settings allow open collector pins to connect to most input pins and other open collector pins, but not to most other types of outputs.

开路发射极

Open emitter

开路发射极逻辑输出。默认的引脚冲突设置允许开路集电极引脚连接到大多数输入引脚和其他开路发射极引脚,但不能连接到大多数其他类型的输出。

An open emitter logic output. The default Pin Conflicts settings allow open collector pins to connect to most input pins and other open emitter pins, but not to most other types of outputs.

未连接

Unconnected

未连接的引脚。ERC 不允许未连接类型的引脚连接到任何其他类型的引脚,并且当此类引脚保持未连接状态时,ERC 不会生成“未连接引脚”违规。未连接引脚在 ERC 引脚冲突映射中不可配置。

A pin that should not be connected to anything. ERC does not allow pins of type unconnected to connect to any other type of pin, and ERC will not generate an "unconnected pin" violation when pins of this type are left unconnected. Unconnected pins are not configurable in the ERC Pin Conflicts map.

如果一个封装有多个焊盘对应于一个未连接的引脚,则这些焊盘在电路板上不需要相互连接。

If a footprint has multiple pads corresponding to a single unconnected pin, the pads do not need to be connected to each other in the board.

当多个未连接类型的引脚堆叠在一个符号中时,它们连接到不同的网络;而其他类型的堆叠引脚则连接到同一个网络。

When multiple pins of type unconnected are stacked in a symbol, they are connected to separate nets, whereas stacked pins of other types are connected to the same net.

请注意,这种引脚类型与在原理图中为引脚添加“未连接”标志 不同 。“未连接”引脚类型表示该引脚在任何原理图中都不应连接,而“未连接”标志表示该引脚在当前原理图中故意未连接。

Note that this pin type is different than placing a no connect flag on a pin in the schematic. The unconnected pin type indicates that the pin should never be connected in any schematic, while a no connect flag indicates that the pin is intentionally unconnected in the current schematic.

将引脚属性推送到其他引脚

您可以通过右键单击引脚并分别选择“按压式引脚长度” 、 “按压式引脚名称大小”或“按压式引脚编号大小”,将引脚的长度、名称大小编号大小应用到符号中的其他引脚。符号中的所有其他引脚都将更新。

You can apply the length, name size, or number size of a pin to the other pins in the symbol by right clicking the pin and selecting Push Pin Length, Push Pin Name Size, or Push Pin Number Size, respectively. All other pins in the symbol will be updated.

定义多个单元的引脚和替代符号表示

在创建和编辑引脚时,具有多个单元和/或图形表示的符号尤其成问题。最常见的情况是,引脚特定于每个符号单元(因为每个单元都有一组不同的引脚)和每种主体样式(因为正常主体样式和备用样式之间的形状和位置不同)。

Symbols with multiple units and/or graphical representations are particularly problematic when creating and editing pins. Most commonly, pins are specific to each symbol unit (because each unit has a different set of pins) and to each body style (because the form and position is different between the normal body style and the alternate form).

符号库编辑器允许同时创建引脚。默认情况下,对引脚所做的更改会应用到多单元符号的所有单元,以及具有备用符号表示的符号的两种表示形式。唯一的例外是引脚的图形类型和名称,它们在符号单元和主体样式之间保持独立。这种依赖关系是为了方便大多数情况下引脚的创建和编辑。可以通过切换同步图钉编辑模式图标主工具栏上的图标来禁用此依赖关系。禁用后,您可以为每个单元和表示形式完全独立地创建引脚。

The symbol library editor allows the simultaneous creation of pins. By default, changes made to a pin are made for all units of a multiple unit symbol and to both representations for symbols with an alternate symbolic representation. The only exception to this is the pin’s graphical type and name, which remain unlinked between symbol units and body styles. This dependency was established to allow for easier pin creation and editing in most cases. This dependency can be disabled by toggling the icon on the main tool bar. This will allow you to create pins for each unit and representation completely independently.

引脚可以是通用的,也可以是不同单元特有的。引脚还可以是所有符号表示通用的,也可以是每个符号表示特有的。如果一个引脚是所有单元通用的,则只需绘制一次。引脚的通用或特有属性在引脚属性对话框中设置。

Pins can be common or specific to different units. Pins can also be common to both symbolic representations or specific to each symbolic representation. When a pin is common to all units, it only has to drawn once. Pins are set as common or specific in the pin properties dialog.

例如,7400 四路双输入与非门的输出引脚。由于它有四个单元和两种符号表示,因此符号定义中定义了八个独立的输出引脚。创建新的 7400 符号时,库编辑器中会显示标准符号表示的单元 A。要编辑备用符号表示中的引脚样式,必须先单击 替代表示图标 工具栏上的按钮启用该符号表示。要编辑每个单元的引脚编号,请使用 单元选择下拉菜单 下拉控件选择相应的单元。

An example is the output pin in the 7400 quad dual input NAND gate. Since there are four units and two symbolic representations, there are eight separate output pins defined in the symbol definition. When creating a new 7400 symbol, unit A of the normal symbolic representation will be shown in the library editor. To edit the pin style in the alternate symbolic representation, it must first be enabled by clicking the button on the tool bar. To edit the pin number for each unit, select the appropriate unit using the drop down control.

别针桌

编辑引脚的另一种方法是使用引脚表,可通过 图钉桌图标图标访问。引脚表以表格形式显示符号中的所有引脚及其属性,因此非常适合批量更改引脚。

Another way to edit pins is to use the Pin Table, which is accessible via the icon. The Pin Table displays all of the pins in the symbol and their properties in a table view, so it is useful for making bulk pin changes.

点击相应的单元格即可编辑任何图钉属性。使用加号图标垃圾桶图标图标分别可以添加和移除图钉。

Any pin property can be edited by clicking on the appropriate cell. Pins can be added and removed with the and icons, respectively.

您可以通过对引脚进行分组,同时编辑多个引脚的同一属性。引脚可以按名称自动分组,也可以手动分组:选择多个引脚,然后单击“分组所选引脚”。单击 小幅更新 16按钮可清除手动分组。您还可以筛选表格,仅显示特定单位的引脚。

You can edit the same property for multiple pins simultaneously by grouping pins. Pins can be automatically grouped by name, or you manually group several pins by selecting them and clicking Group Selected. Click the button to clear the manual grouping. You can also filter the table to only display pins in certain units.

可以通过右键单击标题行并选中或取消选中其他列来显示或隐藏引脚表的列。某些列默认情况下处于隐藏状态。

下图显示了双运算放大器的引脚表。

The screenshot below shows the pin table for a dual opamp.

针桌
其他引脚功能定义

符号引脚可以定义备用引脚功能。备用引脚功能允许您在原理图中放置符号时,为引脚选择不同的名称、电气类型和图形样式。这可用于具有多种功能的引脚,例如微控制器引脚。

Symbol pins can have alternate pin functions defined for them. Alternate pin functions allow you to select a different name, electrical type, and graphical style for a pin when a symbol has been placed in the schematic. This can be used for pins that have multiple functions, such as microcontroller pins.

如下所示,可以在“引脚属性”对话框中添加备用引脚功能。每个备用定义都包含引脚名称、电气类型和图形样式。此微控制器引脚的所有外围功能均以备用引脚名称的形式在符号中定义。

Alternate pin functions are added in the Pin Properties dialog as shown below. Each alternate definition contains a pin name, electrical type, and graphic style. This microcontroller pin has all of its peripheral functions defined in the symbol as alternate pin names.

其他引脚定义

将符号放置到原理图后,即可在原理图编辑器中选择备用引脚功能。有关在原理图中使用备用引脚功能的更多信息,请参阅原理图编辑器符号文档

Alternate pin functions are selected in the Schematic Editor once the symbol has been placed in the schematic. For information on using alternate pin functions in the schematic, see the schematic editor symbol documentation.

创造权力符号

Creating Power Symbols

电源符号是用于标记全局电源网络中导线的符号,例如 `<P1>`VCC或 `<P2> GND`。电源符号的Value字段决定了网络标签。电源符号的行为在 电气连接部分有详细描述。电源符号的处理和创建方式与普通符号相同,但还有一些额外的注意事项,如下所述。

Power symbols are symbols that are used to label a wire as part of a global power net, like VCC or GND. The power symbol’s Value field determines the net label. The behavior of power symbols is described in the electrical connections section. Power symbols are handled and created the same way as normal symbols, but there are several additional considerations described below.

将电源符号放置在专用库中可能很有用。KiCad 的符号库会将电源符号放置在其中power,用户也可以创建库来存储自己的电源符号。如果在符号属性中选中“定义为电源符号”复选框,则该符号将出现在原理图编辑器的“添加电源符号”对话框中,以便于访问。

It may be useful to place power symbols in a dedicated library. KiCad’s symbol library places power symbols in the power library, and users may create libraries to store their own power symbols. If the Define as power symbol box is checked in a symbol’s properties, that symbol will appear in the Schematic Editor’s Add Power Symbol dialog for convenient access.

电源符号由一个电源输入类型的引脚组成。此外,必须选中“定义为电源符号”属性。

Power symbols consist of a single pin of type Power Input. They must also have the Define as power symbol property checked.

在之前的 KiCad 版本中,电源符号的引脚必须同时是电源输入引脚且不可见,引脚名称决定了电源符号所连接的网络名称。从 KiCad 8 版本开始,电源符号中的引脚不再需要不可见,网络名称由电源符号的Value字段决定。

下面是一个电源符号的示例GND

Below is an example of a GND power symbol.

编辑权力符号
电源符号引脚

要创建权力符号,请按以下步骤操作:

To create a power symbol, use the following steps:

  • 添加一个电源输入引脚。设置引脚编号1、长度0,将图形样式设置为“线”,并使其可见。引脚编号、名称、长度和线样式在电气上无关紧要。

  • Add a pin of type Power input. Make the pin number 1, the length 0, set the graphic style to Line, and make the pin visible. The pin number, name, length, and line style do not matter electrically.

  • 将引脚放置在符号锚点上。这不是必需的,但可以更轻松地在原理图中放置电源符号。

  • Place the pin on the symbol anchor. This is not required but makes it easier to place the power symbol in the schematic.

  • 使用形状工具绘制符号图形。

  • Use the shape tools to draw the symbol graphics.

  • 将符号值设置为所需的网络名称。符号值在电气上至关重要:它决定了符号连接的网络名称。此字段可以在符号放置到原理图后进行更改,这将改变符号连接的网络。

  • Set the symbol value to the desired net name. The symbol value is electrically important: it determines the symbol’s connected net name. This field can be changed later, after the symbol has been placed in the schematic, which will change which net the symbol connects to.

  • 在“符号属性”窗口中选中“定义为电源符号”复选框。这将使该符号出现在“添加电源符号”对话框中,防止该符号被分配封装,并将其从电路板、物料清单和网表中排除。

  • Check the Define as power symbol box in Symbol Properties window. This makes the symbol appear in the Add Power Symbol dialog, prevents the symbol from being assigned a footprint, and excludes the symbol from the board, BOM, and netlists.

  • 同时,在“符号属性”窗口中取消选中“显示引脚编号”“显示引脚名称”选项。虽然这不是必需的,但可以改善符号的外观。

  • Also deselect the Show pin number and Show pin name options in the Symbol Properties window. This is not necessary but improves the symbol’s appearance.

  • 设置符号参考并取消选中“显示”复选框。参考文本本身并不重要,但第一个字符必须是“” #。例如,对于上面显示的电源符号,其参考可以是“ #GND”。参考以“”开头的符号#不会添加到 PCB 中,也不会包含在物料清单导出或网络表中,并且无法在封装分配工具中为其分配封装。如果电源符号的参考不是以“”开头#,则在运行注释或封装分配工具时,系统会自动插入该字符。

  • Set the symbol reference and uncheck the Show box. The reference text is not important except for the first character, which should be #. For the power symbol shown above, the reference could be #GND. Symbols with references that begin with # are not added to the PCB, are not included in Bill of Materials exports or netlists, and they cannot be assigned a footprint in the footprint assignment tool. If a power symbol’s reference does not begin with #, the character will be inserted automatically when the annotation or footprint assignment tools are run.

检查符号

Checking Symbols

符号编辑器可以检查符号中存在的常见问题。使用符号检查器图标顶部工具栏中的按钮运行符号检查器。

The Symbol Editor can check for common issues in your symbols. Run the symbol checker using the button in the top toolbar.

符号检测器检测到离网引脚

符号检查器会检查:

The symbol checker checks for:

  • 偏离网格的引脚(如果引脚的位置不是当前符号编辑器网格的倍数,则该引脚被视为偏离网格。强烈建议符号引脚使用 50 mil 网格)。

  • Pins that are off-grid (pins are considered off grid if their position is not a multiple of the current symbol editor grid. It is strongly recommended to use a 50 mil grid for symbol pins)

  • 重复的引脚

  • Pins that are duplicated

  • 图形形状的问题,例如零尺寸形状

  • Issues with graphical shapes, such as zero-sized shapes

  • 非法的参考标识符前缀:参考标识符前缀不应以数字或逗号结尾。?

  • Illegal reference designator prefixes: reference designator prefixes should not end with a number or ?

  • 电源符号设计错误。电源符号应具备以下特征:

    • 单个单元

    • 没有其他车身样式

    • 单个引脚,其类型可以是电源输出(参见 PWR_FLAG)或可见的电源输入(参见 电源符号)。

  • Incorrectly designed power symbols. Power symbols should have:

    • A single unit

    • No alternate body styles

    • A single pin which is either of type Power Output (see PWR_FLAG) or visible and of type Power Input (see power symbols)

  • 非电源符号中的隐藏电源输入引脚:这些引脚会形成隐式连接,因此不建议使用。

  • Hidden Power Input pins in non-power symbols: these create implicit connections and are not recommended

在之前的 KiCad 版本中,电源符号 需要一个不可见的电源输入引脚,以便建立全局连接。在 KiCad 8 中,电源输入引脚不再需要不可见。因此,符号检查器会报告是否检测到不可见的电源输入引脚。

浏览符号库

Browsing symbol libraries

符号库浏览器允许您快速查看符号库的内容。您可以通过单击 图书馆查看器图标符号编辑器主工具栏上的图标或通过“视图” → “符号库浏览器”访问符号库查看器。

The Symbol Library Browser allows you to quickly examine the contents of symbol libraries. The Symbol Library Viewer can be accessed by clicking icon on the main Symbol Editor toolbar or with ViewSymbol Library Browser.

要查看库的内容,请从左侧面板的列表中选择一个库。所选库中的所有符号将显示在第二个面板中。选择符号名称即可查看该符号。

To examine the contents of a library, select a library from the list in the left hand panel. All symbols in the selected library will appear in the second panel. Select a symbol name to view the symbol.

符号库浏览器

双击符号名称或使用该 向原理图图标添加符号 按钮会将符号添加到原理图中。

Double clicking the name of a symbol or using the button adds the symbol to the schematic.

顶部工具栏包含以下命令:

The top toolbar contains the following commands:

上一个符号图标

选择库中的上一个符号。

Select previous symbol in library.

下一个符号图标

选择库中的下一个符号。

Select next symbol in library.

刷新24 放大 24 缩小 24 缩放以适应第 24 页

缩放工具。

Zoom tools.

显示引脚类型图标

切换引脚电气类型的显示。

Toggle display of pin electrical types.

显示密码图标

切换显示密码。

Toggle display of pin numbers.

morgan1 24 morgan2 24

如果适用,请选择标准或替代的德摩根符号表示方法。

Select standard or alternate De Morgan representation of symbol, if applicable.

符号编辑器单位选择器

选择多单位符号的单位。

Select the unit of a multi-unit symbol.

icons/datasheet_png

如果已定义,请打开该符号的数据手册。

Open the symbol’s datasheet, if it is defined.

向原理图图标添加符号

在原理图中插入电流符号。

Insert current symbol into the schematic.

原理图设计模块

Schematic design blocks

原理图设计块允许您保存原理图的一部分,以便稍后重复使用。您可以在同一原理图或不同的原理图中重复使用设计块。设计块与符号和封装类似,保存并组织在设计块库中。使用设计块时,保存的原理图片段会插入到当前原理图中,可以插入到当前图纸中,也可以插入到新的子图纸中。

Schematic design blocks allow you to save a portion of a schematic and reuse it later. You can reuse design blocks within the same schematic or in different schematics. Design blocks are saved and organized in design block libraries, much like symbols and footprints. When you use a design block, the saved schematic fragment is inserted into the current schematic, either in the current sheet or in a new subsheet.

要使用原理图设计模块,首先单击 “视图”“面板”“设计模块”显示“设计模块”面板。这会在原理图编辑器的右侧打开一个停靠面板。要关闭该面板,请使用相同的菜单项,或在面板中单击鼠标右键并选择“隐藏库树”

To use schematic design blocks, first show the Design Blocks panel by clicking ViewPanelsDesign Blocks. This opens a docked panel on the right side of the schematic editor. To close the panel, use the same menu entry or right click in the panel and choose Hide Library Tree.

设计模块面板

在原理图中运用设计模块

Using design blocks in a schematic

“设计模块”面板包含一个库树,其中列出了您的设计模块库以及每个库中包含的设计模块。您可以展开或折叠每个库来显示或隐藏该库中的设计模块。树的顶部有一个“最近使用”的伪库,其中包含您最近放置的所有设计模块。您可以右键单击库并选择“固定库”将其固定到列表顶部。

The Design Blocks panel contains a library tree that lists your design block libraries and the design blocks contained in each library. Each library can be expanded or collapsed to show or hide the design blocks in that library. There is a Recently Used pseudo-library at the top of the tree that contains any design blocks that you have recently placed. You can pin any libraries to the top of the list by right clicking the library and selecting Pin Library.

您可以使用“设计模块”面板顶部的筛选文本框,按名称、描述和关键字筛选设计模块。默认情况下,匹配结果按最佳匹配排序,但您可以使用按钮更改为按字母顺序排序 小排序描述 16

You can filter design blocks by their name, description, and keywords using the filter textbox at the top of the Design Blocks panel. By default, matches are sorted by best match, but you can change to sorting alphabetically using the button.

在库树中选择一个设计块后,库树下方会显示该设计块的名称和元数据,以及该设计块的图形预览。元数据包括设计块的描述和关键字。

When you select a design block in the library tree, the design block’s name and metadata are displayed below the library tree along with a graphical preview of the design block. The metadata includes the block’s description and keywords.

要将设计块添加到原理图中,请在库树中双击它,或者右键单击设计块并选择“放置设计块”

To add a design block to the schematic, double click it in the library tree or right click a design block and select Place Design Block.

如果选中“放置为图纸”复选框,则需要在编辑画布中单击两次以放置 层级图纸的两个角点。设计块的内容将放置在新图纸中。如果未选中“放置为图纸”复选框,则单击画布一次会将设计块的内容直接放置到当前原理图中。

If the Place as sheet checkbox is enabled, you will need to click twice in the editing canvas to place two corners of a hierarchical sheet. The design block contents will be placed in the new sheet. If the Place as sheet checkbox is not enabled, clicking once in the canvas will place the contents of the design block directly into the current schematic.

如果选中“放置重复副本”复选框,KiCad 会在您放置完上一个图块后再次开始放置下一个图块。要取消放置下一个图块,请按 Enter 键Esc或右键单击并选择“取消”

If the Place repeated copies checkbox is enabled, KiCad will begin placing the design block again when you finish placing the previous block. To cancel placing the next block, press Esc or right click and select Cancel.

如果选中“保留注释”复选框,KiCad 将在插入设计块时保持已保存设计块中定义的符号注释不变。如果未选中该复选框,KiCad 将在插入设计块时重置符号注释,并根据当前注释设置重新注释块中的所有符号。

If the Keep annotations checkbox is enabled, KiCad will insert the design block without changing the symbol annotations as defined in the saved design block. If it is not enabled, KiCad will reset the symbol annotations while inserting the design block and reannotate all of the symbols in the block according to the current annotation settings.

设计块一旦放置在原理图中,其内容就与其他原理图对象一样,可以像正常添加到原理图中一样进行编辑、移动、删除等操作。

Once placed in a schematic, the contents of a design block behave the same as any other schematic objects and can be edited, moved, deleted, etc. exactly as if they were added to the schematic normally.

保存和管理设计模块

Saving and managing design blocks

设计块保存在设计块库中,因此您需要先添加库才能保存任何设计块。要创建新库,请在库树中右键单击并选择“新建库…”。此时,您必须选择将新库添加到全局设计块库表还是项目设计块库表。全局库表中的库可供所有项目使用,而项目库表中的库仅在当前项目中可用。

Design blocks are saved in design block libraries, so you need to add a library before you can save any design blocks. To create a new library, right click in the library tree and select New Library…​. At this point you must choose whether the new library should be added to the global design block library table or the project design block library table. Libraries in the global library table will be available to all projects, while libraries in the project library table will only be available in the current project.

全局和项目设计块库表通过 “首选项”“管理设计块库…”进行管理。这包括删除和重命名设计块库。设计块库表的行为方式与符号库表相同。有关管理库表的更多信息,请参阅 符号库表文档
设计模块新库

选择库表后,您必须为新库选择名称和位置。系统将在指定位置创建一个新的空库。

Following selection of the library table, you must choose a name and location for the new library. A new, empty library will be created at the specified location.

创建所需的设计块库后,即可创建新的设计块并将其保存到库中。设计块可以从原理图的全部内容创建,也可以从选定的原理图对象创建。要创建并保存新的设计块,请先选择所需的源对象,方法是打开所需的原理图或在编辑画布中选择对象。然后,右键单击将包含该设计块的设计块库,并 根据需要选择“将当前原理图另存为设计块…”“将所选内容另存为设计块” 。

After creating the desired design block library, you can create new design blocks and save them in the library. Design blocks can be created either from the entire contents of a schematic sheet or from a selection of schematic objects. To create and save a new design block, select the desired source objects, either by opening the desired sheet or selecting the objects in the editing canvas. Then right click the design block library that will contain the block and select Save Current Sheet as Design Block…​ or Save Selection as Design Block as appropriate.

设计块属性

这将打开“设计块属性”对话框,您可以在其中编辑新设计块的属性。

This brings up the Design Block Properties dialog, where you can edit the properties of the new design block.

  • 名称:这是新设计块的名称,显示在库树和预览窗格中。使用筛选文本框筛选设计块时也会用到此名称。当设计块作为图纸添加到原理图时,这是新图纸的默认名称。

  • Name: this is the name of the new design block, which is shown in the library tree and the preview pane. It is also used when filtering design blocks with the filter textbox. When design blocks are added to a schematic as a sheet, this is the default name of the new sheet.

  • 关键词:这些是以空格分隔的关键词,用于描述设计块。它们会显示在设计块预览窗格中,并在使用筛选文本框筛选设计块时使用。

  • Keywords: these are space-separated keywords describing the design block. They are displayed in the design block preview pane and used when filtering design blocks with the filter textbox.

  • 描述:这是设计块的描述,显示在库树和预览窗格中。使用筛选文本框筛选设计块时也会用到此描述。

  • Description: this is a description of the design block, which is shown in the library tree and the preview pane. It is also used when filtering design blocks with the filter textbox.

  • 默认字段:这些是键值对,当设计块被放置为工作表时,它们会作为 层级式工作表字段包含在内。当设计块未被放置为工作表时,这些字段将被忽略。

  • Default Fields: these are key/value pairs which are included as hierarchical sheet fields when the design block is placed as a sheet. Fields are ignored when the design block is not placed as a sheet.

创建设计块后,您可以通过在设计块库树中右键单击设计块并选择 “属性…”来编辑其属性。

You can edit a design block’s properties after creating it by right clicking the design block in the design block library tree and selecting Properties…​.

模拟器

Simulator

KiCad 提供了一个嵌入式电路仿真器,它使用 ngspice作为仿真引擎。ngspice 是一个 SPICE 仿真器,源自最初广泛使用的 Berkeley SPICE 程序。KiCad 的仿真器还可以使用 IBIS 模型对器件引脚进行仿真。

KiCad provides an embedded electrical circuit simulator using ngspice as the simulation engine. ngspice is a SPICE simulator derived from the original widely used Berkeley SPICE program. KiCad’s simulator can also run simulations using IBIS models of device pins.

在 KiCad 中创建和运行仿真过程主要分为两个部分:

The process of creating and running a simulation in KiCad has two main parts:

  1. 在 KiCad 的原理图编辑器中绘制仿真原理图。仿真原理图与普通原理图类似(甚至可以完全相同),但通常包含仿真专用的器件,例如源器件,并可能排除与仿真无关的器件,例如连接器。创建仿真原理图需要确保原理图中的所有符号都分配了合适的模型。查找或创建仿真模型,然后验证它们,可能是整个过程中非常重要的一部分。KiCad 包含一些用于基本器件(例如源器件、无源器件和通用半导体器件)的简单仿真模型,但除此之外,您需要查找或创建自己的模型。

  2. Drawing a simulation schematic in KiCad’s Schematic Editor. Schematics for simulations are similar to normal schematics (and can even be identical), but they typically include simulation-specific devices, such as sources, and may exclude devices that are irrelevant for simulation, such as connectors. Creating a schematic simulation requires ensuring all symbols in the schematic have appropriate models assigned. Finding or creating simulation models, and then validating them, can be a significant portion of the process. KiCad includes some simple simulation models for basic devices such as sources, passive devices, and generic semiconductor devices, but beyond those you will need to find or create your own models.

  3. 使用仿真工具运行仿真。这包括选择分析类型(瞬态、交流等)并配置其选项。可以执行多种不同的分析。仿真器提供一个绘图窗口,用于查看和分析仿真结果。

  4. Running the simulation using the simulator tool. This includes choosing the type of analysis (transient, AC, etc.) and configuring its options. Multiple different analyses can be performed. The simulator provides a plot window to view and analyze simulation results.

绘制仿真原理图时,Simulation_SPICEKiCad 默认安装的符号库非常有用。它包含仿真中常用的元件,例如电压源和电流源、通用半导体符号以及其他仿真专用器件。该符号库中的符号将在下文详细介绍。

When drawing schematics for simulation, the Simulation_SPICE symbol library, installed with KiCad by default, may be useful. It contains common elements used for simulation such as voltage and current sources, generic semiconductor symbols, and other simulation-specific devices. The symbols in this library are described in detail below.

虽然这些元素能够支持各种各样的仿真工作,但熟悉其他环境中 SPICE 的用户通常会习惯于将市售半导体、集成电路和其他器件的模型作为更复杂的 SPICE 模型集成到 KiCad 中。事实上,半导体制造商通常会免费提供这些模型,以帮助用户使用其器件进行电路仿真和开发。请注意,KiCad 的发行版中不包含任何商业 SPICE 模型,但您可以自由地在 KiCad 仿真器中使用您可能拥有的任何模型,或您在其他电路仿真器中使用过的任何模型。

While these elements enable a great variety of simulation work, users familiar with SPICE in other environments will be used to incorporating models of commercially-available semiconductors, integrated circuits, and other devices as more complex SPICE models. Indeed, semiconductor manufacturers often freely supply these to help users simulate and develop circuits using their parts. Note that while KiCad does not include any commercial SPICE models in its distribution, you are free to use any models you may have, or have used with other circuit simulators, in KiCad’s simulator.

一般来说,如果一个模型能与其他 SPICE 仿真器兼容,那么它也应该能与 KiCad 仿真器兼容,尽管有些 SPICE 仿真器实现了 ngspice 不支持的扩展。ngspice 提供了多种兼容模式来提高与其他仿真器的兼容性。

In general, if a model works with other SPICE simulators, it should work with the KiCad simulator, although some SPICE simulators implement extensions that are unsupported by ngspice. ngspice offers several compatibility modes to improve compatibility with other simulators.

最后,为了快速展示 KiCad 仿真器的功能,KiCad 发行版中包含了一些演示项目。这些项目位于指定demos/simulation目录中。

Finally, to quickly showcase the capabilities of the KiCad simulator, some demonstration projects are included in the KiCad distribution. They can be found in the demos/simulation directory.

分配模型

Assigning models

在仿真电路之前,需要先将仿真模型分配给符号。

You need to assign simulation models to symbols before you can simulate your circuit.

每个符号只能分配一个模型,即使该符号由多个单元组成。对于包含多个单元的符号,应将模型分配给第一个单元。

Each symbol can have only one model assigned, even if the symbol consists of multiple units. For symbols with multiple units, you should assign the model to the first unit.

SPICE 模型信息以文本形式存储在符号字段中。因此,您可以在符号编辑器或原理图编辑器中定义它。要将仿真模型分配给符号,请打开“符号属性”对话框,然后单击“ 仿真模型…”按钮,这将打开“仿真模型编辑器”对话框。

SPICE model information is stored as text in symbol fields. Therefore you may define it in either the symbol editor or the schematic editor. To assign a simulation model to a symbol, open the Symbol Properties dialog and click the Simulation Model…​ button, which opens the Simulation Model Editor dialog.

您可以通过选中“符号属性”对话框中的“从仿真中排除”复选框,将符号完全从仿真中排除 。选中此属性的符号将以灰色轮廓显示,旁边会显示一个小的仿真图标,如下图所示。

You can exclude a symbol from simulation entirely by checking the exclude from simulation checkbox in the Symbol Properties dialog. Symbols with this attribute set are drawn with a grey outline and a small simulation icon next to them, as shown below.

从 SIM 符号中排除

推断模型

Inferred models

电阻器、电感器和电容器的模型可以被推断出来,这意味着 KiCad 会检测到它们是无源元件,并自动分配相应的仿真模型。因此,它们不需要任何特殊设置;用户只需设置Value符号字段即可。

Resistor, inductor, and capacitor models can be inferred, which means that KiCad will detect that they are passives and automatically assign an appropriate simulation model. Therefore they do not require any special settings; users only need to set the Value field of the symbol.

KiCad 根据以下标准推断符号的仿真模型:

KiCad infers simulation models for symbols based on the following criteria:

  • 该符号恰好有两个引脚,

  • The symbol has exactly two pins,

  • 参考标识符以R,L或开头C

  • The reference designator begins with R, L or C.

推断模型是理想模型。如果仿真需要非理想模型,例如包含寄生电容的电感器,则必须显式指定包含该寄生电容的模型。

Inferred models are ideal models. If the simulation requires a non-ideal model, for example an inductor with parasitic capacitance included, you must explicitly assign a model that includes it.

内置模型

Built-in models

KiCad 提供多种标准仿真模型。这些模型无需外部模型文件,其参数可在 KiCad 的仿真模型编辑器图形用户界面 (GUI) 中编辑。以下器件可用:

KiCad offers several standard simulation models. They do not require an external model file, and their parameters can be edited in KiCad’s Simulation Model Editor GUI. The following devices are available:

  • 电阻器(包括电位器)

  • Resistors (including potentiometers)

  • 电容器

  • Capacitors

  • 电感器

  • Inductors

  • 输电线路

  • Transmission lines

  • 开关

  • Switches

  • 电压源和电流源

  • Voltage and current sources

  • 二极管

  • Diodes

  • 晶体管(BJT、MOSFET、MESFET 和 JFET)

  • Transistors (BJTs, MOSFETs, MESFETs, and JFETs)

  • XSPICE 代码模型

  • XSPICE code models

  • 香料原料

  • Raw SPICE elements

要向符号添加内置模型,请打开“仿真模型编辑器”对话框(“符号属性”“仿真模型… ”),然后选择 “内置 SPICE 模型” 。之后,您可以从“器件”下拉列表中选择器件类型 ,并从“器件类型”下拉列表中选择器件子类型 。

To add a built-in model to a symbol, open the Simulation Model Editor dialog (Symbol PropertiesSimulation Model…​) and select Built-in SPICE model. You can then select the kind of device from the device dropdown and the device subtype from the device type dropdown.

有关这些模型及其参数的更多详细信息,请参阅ngspice 文档。

Refer to the ngspice documentation for more details about these models and their parameters.

用于设置内置模型的界面

设备设置要模拟的设备类型:电阻器、BJT、电压源等。该值存储在符号的Sim.Device字段中。

Device sets the type of device to simulate: a resistor, BJT, voltage source, etc. This value is stored in the symbol’s Sim.Device field.

器件类型用于选择器件的模型类型。大多数器件都有多种模型可供选择。模型的精度、优化特性、可用参数以及引脚数量可能有所不同。例如,理想 电阻器模型模拟一个具有两个端子和一个 resistance参数的简单电阻器,而电位器电阻器模型模拟一个具有三个端子和一个用于表示滑动位置的附加参数的可调电阻器。某些器件的模型类型选择尤其丰富:例如,N沟道MOSFET就有17种可用类型,每种类型都使用不同的数学模型来模拟晶体管的行为。对于模拟特定器件或电路,或者执行特定分析,不同的模型可能各有优劣。 有关模型及其参数的详细信息,请参阅ngspice文档。器件类型值存储在符号的Sim.Type字段中。

Device type selects the type of model to use for the device. Most devices have several types of models to choose from. Models may vary in their degree of accuracy, which characteristics they are optimized for, what parameters they have available, and how many pins they have. For example, the ideal resistor type models a simple resistor with two terminals and a single resistance parameter, while the potentiometer resistor type models an adjustable resistor with three terminals and an additional parameter for wiper position. Some devices have an especially large number of types to choose from: N-channel MOSFETs, for example, have 17 available types, each of which uses a different mathematical model to simulate the transistor behavior. One model may be more or less appropriate than another for simulating a specific device or circuit or for performing a particular analysis. Refer to the ngspice documentation for detailed information about models and their parameters. The device type value is stored in the symbol’s Sim.Type field.

“参数”选项卡显示模型的参数,并允许您对其进行编辑。例如,电阻器的阻值、电压源的波形、MOSFET 的宽度和长度等。任何与模型默认值不同的参数都会存储在符号字段中Sim.Params

The parameters tab displays the parameters of the model and lets you edit them. For example, a resistor’s resistance, a voltage source’s waveform, a MOSFET’s width and length, etc. Any parameters that differ from the model’s defaults are stored in the symbol’s Sim.Params field.

代码选项卡显示生成的 SPICE 模型,该模型将写入 SPICE 网表以进行仿真。

The code tab displays the generated SPICE model as it will be written to the SPICE netlist for simulation.

“将参数‘<参数名称>’保存到值字段”复选框会使用符号的Value字段来存储参数,而不是使用符号的Sim.Params字段。这样可以更方便地在原理图中编辑简单的模型,而无需打开仿真模型编辑器。此选项仅适用于理想无源模型(R、L、C)和直流源。如果Sim.Params符号中已存在该字段,则该Value字段的优先级高于符号的字段。

The Save parameter '<parameter name>' in Value field checkbox uses the symbol’s Value field for storing parameters instead of the Sim.Params field. This may make it easier to edit simple models from the schematic, without opening the Simulation Model Editor. This option is only available for ideal passive models (R, L, C) and DC sources. If the field Sim.Params exists in the symbol, it will take priority over the Value field.

外部模型

External models

KiCad 还可以从外部文件加载 SPICE 模型。通常,您可以通过这种方式将特定商用器件(例如 555 定时器或 TL071 运算放大器)的 SPICE 模型添加到仿真中。这类模型可以从许多来源轻松获取,包括制造商的网站。这些模型必须采用标准的 SPICE 格式,且不得加密。

KiCad can also load SPICE models from external files. This is typically how you will add a SPICE model of a specific commercially-available part (for example, a 555 timer or a TL071 operational amplifier) to your simulation. Models such as these are readily available from numerous sources, including manufacturers' web sites. These models must be in a standard SPICE format and must not be encrypted.

外部模型可以是以下几种类型之一:

An external model can be one of the following types:

  • 器件模型(.model)。这是一个固有器件(例如无源器件、二极管、晶体管等),它具有一组定义其行为的参数值。器件模型的参数可以在仿真模型编辑器图形用户界面中进行编辑。

  • A device model (.model). This is an intrinsic device (a passive, diode, transistor, etc.) with a set of parameter values defining its behavior. The parameters for a device model are editable in the Simulation Model Editor GUI.

  • 子电路模型(.subckt)。这种模型使用一组其他 ngspice 电路元件来定义其行为。如果子电路模型包含参数(params:在其定义中按顺序排列),则这些参数可以在仿真模型编辑器 GUI 中编辑。

  • A subcircuit model (.subckt). This is a model that uses a collection of other ngspice circuit elements to define its behavior. If a subcircuit model contains parameters (in a params: sequence in its definition), the parameters are editable in the Simulation Model Editor GUI.

要从外部文件加载模型,请打开仿真模型编辑器对话框(符号属性仿真模型… ​),然后选择 “从文件加载 SPICE 模型”

To load a model from an external file, open the Simulation Model Editor dialog (Symbol PropertiesSimulation Model…​) and select SPICE model from file.

从文件设置库模型的接口

文件是要使用的模型文件的路径。未加密的模型文件是纯文本文件,通常带有.lib.txt、.sub.mt等扩展名,但KiCad可以接受任何扩展名的有效模型文件。

File is the path to the model file to use. Unencrypted model files are plain, human-readable text files and often have extensions such as .lib, .sub etc., although KiCad will accept a valid model with any extension.

文件路径可以是绝对路径,也可以是相对于项目文件夹的相对路径。SPICE_LIB_DIR如果您已 定义路径变量,则路径也可以相对于该变量的值。如果在文件浏览器中启用“嵌入文件”复选框,库文件将嵌入到原理图(或符号库)中。这使得原理图(或符号库)更具可移植性,因为它不依赖于外部库文件。库文件名保存在符号的Sim.Library字段中。

The path to the file can be absolute, or relative to the project folder. The path can also be relative to the value of SPICE_LIB_DIR if you have defined that path variable. If you enable the Embed File checkbox in the file browser, the library file will be embedded in the schematic (or symbol library). This makes the schematic (or schematic) more portable as it doesn’t rely on an external library file. The library filename is saved in the symbol’s Sim.Library field.

模型是模型文件中所需模型的名称。一个模型文件可能包含多个模型,如果包含多个模型,它们都会显示在列表中。您可以使用搜索框筛选模型列表。选定的模型会列在符号Sim.Name字段中。

Model is the name of the desired model in the model file. A model file may contain multiple models, and if so they will all be shown in the list. You can filter the list of models using the search box. The selected model is listed in the symbol’s Sim.Name field.

可以使用“参数”选项卡覆盖现有参数(或指定其他参数) 。对于器件模型,该类型器件的所有参数均可编辑。对于子电路模型,子电路定义中包含的任何参数均可编辑。在“参数”选项卡中覆盖的任何参数 都将存储在符号的相应Sim.Params字段中。

Parameters can be overridden (or additional parameters specified) using the Parameters tab. For device models, all parameters for that type of device are editable. For subcircuit models, any parameters included in the subcircuit definition are editable. Any parameters that are overridden in the Parameters tab are stored in the symbol’s Sim.Params field.

“代码选项卡显示生成的 SPICE 模型,该模型将写入 SPICE 网表以进行仿真。

The Code tab displays the generated SPICE model as it will be written to the SPICE netlist for simulation.

KiCad 不包含特定商用器件的 SPICE 模型。这些模型通常需要从器件制造商或其他互联网资源获取。

IBIS模型

IBIS models

IBIS(I/O 缓冲区信息规范)文件是 SPICE 模型之外的另一种选择,用于对数字器件上的输入/输出缓冲区的行为进行建模。要加载 IBIS 文件,用户应遵循 SPICE 库模型的加载步骤,但需要提供一个.ibsIBIS 文件。

IBIS (I/O Buffer Information Specification) files are an alternative to SPICE models for modeling the behavior of input/output buffers on digital parts. In order to load an IBIS file, users should follow the procedure for SPICE library models, but provide a .ibs file.

用于设置 ibis 模型的界面

文件路径是要使用的模型文件的路径。该路径可以是绝对路径,也可以是相对于项目文件夹的相对路径。 SPICE_LIB_DIR如果您已 定义路径变量,则该路径也可以是相对于该变量值的相对路径。库文件名保存在符号的Sim.Library字段中。如果加载的是 IBIS 模型文件,则对话框中的其余字段将与该 IBIS 模型相关。

File is the path to the model file to use. The path can be absolute or relative to the project folder. The path can also be relative to the value of SPICE_LIB_DIR if you have defined that path variable. The library filename is saved in the symbol’s Sim.Library field. If an IBIS model file is loaded, the remaining fields in the dialog will relate to the IBIS model.

组件选择要使用的 IBIS 文件中的组件,因为 IBIS 文件可以包含多个组件。组件名称保存在符号 Sim.Name字段中。

Component selects which component from the IBIS file to use, as IBIS files can contain multiple components. The component name is saved in the symbol’s Sim.Name field.

“引脚”选项用于选择要模拟的 IBIS 模型引脚。所选引脚必须在“引脚分配”选项卡中映射到符号引脚。所选引脚的编号将保存在符号的Sim.Ibis.Pin相应字段中。

Pin selects which pin in the IBIS model to simulate. The selected pin must be mapped to a symbol pin in the Pin Assignments tab. The chosen pin’s number is saved in the symbol’s Sim.Ibis.Pin field.

模型是所选引脚(例如输入或输出)的可用模型列表。所选模型名称保存在符号 Sim.Ibis.Model字段中。

Model is the list of models available for the selected pin, for example an input or an output. The chosen model name is saved in the symbol’s Sim.Ibis.Model field.

类型决定了引脚在仿真中应执行的操作。引脚可以是无源 器件(不驱动任何值);可以是直流驱动器(驱动高阻抗、低阻抗或高阻);也可以是矩形波或 伪随机二进制序列(PRBS) 驱动器。此值存储在符号的Sim.Type字段中。

Type selects what the pin should do in the simulation. A pin can be a passive device that doesn’t drive any value; it can be a DC driver that drives high, low, or high-impedance; or it can be a rectangular wave or PRBS driver. This value is stored in the symbol’s Sim.Type field.

“参数”选项卡允许您查看和编辑模型的参数。对于每个参数,您可以根据 IBIS 文件中的定义,在最小值、典型值或最大值之间切换。您还可以根据引脚的类型选择驱动波形的参数。任何与默认值不同的参数都会存储在符号Sim.Params字段中。

The Parameters tab lets you see and edit the parameters of the model. For each parameter, you can switch between a minimum, typical, or maximum value, as defined in the IBIS file. You can also choose the parameters of the driven waveform, depending on the pin’s chosen type. Any parameters that differ from the defaults are stored in the symbol’s Sim.Params field.

KiCad 本身不包含 IBIS 符号模型。IBIS 模型通常需要从设备制造商处获取。
KiCad 的Simulation_SPICE符号库提供了一些可用于 IBIS 仿真的符号。例如,IBIS_DEVICE`<device>` 符号可用于表示设备(输入)引脚,而 `<driver> IBIS_DRIVER` 符号可用于模拟驱动引脚。此外,每个符号都有用于差分引脚的变体。

引脚分配

Pin Assignment

仿真模型中的引脚编号可能与对应的电路符号不同。例如,二极管的 SPICE 模型通常将引脚 1 视为阳极,而电路原理图符号通常将引脚 1 视为阴极。运算放大器模型的引脚分配也很可能与封装或电路原理图中的引脚编号不符。

Simulation models may have their pins numbered differently than the corresponding symbol. For example, SPICE models for diodes usually consider pin 1 to be the anode, while schematic symbols are usually drawn with pin 1 as the cathode. Operational amplifier models are also very likely to have model pin assignments that do not match package or schematic pin numbers.

您可以使用仿真模型编辑器的引脚分配选项卡将符号的引脚映射到仿真模型的引脚。

You can use the Simulation Model Editor’s Pin Assignments tab to map the symbol’s pins to the simulation model pins.

务必确保符号引脚与仿真模型引脚正确映射。否则,可能会导致仿真结果错误或混乱,甚至仿真失败。
引脚分配接口

左侧列显示每个符号引脚的名称和编号,即 KiCad 原理图中元件上显示的引脚编号和名称。右侧列显示当前模型文件中定义的对应引脚。对于每个符号引脚,您可以从右侧列的下拉菜单中选择仿真模型中对应的引脚。如果原理图元件包含模型中未包含的引脚(例如运算放大器的“零位”引脚未建模),则可以在“引脚分配”下拉菜单中将该原理图元件引脚设置为“未连接”。与其他引脚分配不同,“未连接”可以根据需要分配给多个引脚。

The left column displays the name and number of each symbol pin, i.e. the pin numbers and names that appear on the schematic part in KiCad. The right column displays the corresponding pin as defined in the model file in use. For each symbol pin, you can select the corresponding pin from the simulation model in the dropdown in the right column. In the cases where a schematic part has pins that are not in the model, as in the case of an operational amplifier with 'nulling' pins that are not modeled, the schematic part pin may be assigned to the 'Not Connected' option in the Pin Assignments dropdown. Unlike other pin assignments, 'Not Connected' may be assigned to multiple pins if necessary.

使用子电路模型时,对话框会在引脚分配下方显示模型的代码,供用户在分配引脚时参考。一个编写良好的模型通常会包含一个有用的参考部分(以注释的形式),向用户说明模型引脚的映射方式。

When you use a subcircuit model, the dialog displays the model’s code under the pin assignments for use as a reference while assigning pins. A well-written model will often include a helpful reference section (as a set of comments) to inform the user how the model pins are mapped.

值表示法

Value notation

该模拟器支持多种表示法,用于在仿真模型参数、仿真分析设置选项和 SPICE 指令中编写数值:

The simulator supports several notations for writing numerical values in simulation model parameters, simulation analysis setup options, and SPICE directives:

  • 普通表示法:10100,,0.003

  • Plain notation : 10100, 0.003,

  • 科学计数法:1.01e4,,3e-3

  • Scientific notation: 1.01e4, 3e-3,

  • 前缀表示法:10.1k3m

  • Prefix notation: 10.1k, 3m.

  • RKM 表示法:4k710R

  • RKM notation: 4k7, 10R.

您可以混合使用前缀和科学计数法。因此,`\scikit-learn`3e-4k是一个有效的输入,等价于 `\scikit-learn` 0.3。有效的前缀列表如下所示。它们区分大小写。

You can mix prefix and scientific notations. As such, 3e-4k is a valid input and is equivalent to 0.3. The list of valid prefixes is shown below. They are case sensitive.

前缀 姓名 乘数

一个

a

atto

10-18

10-18

f

f

飞秒

femto

10-15

10-15

p

p

微微

pico

10-12

10-12

n

n

纳米

nano

10-9

10-9

u

micro

10-6

10-6

m

百万

milli

10 -3

10-3

k

k

公斤

kilo

10 3

103

M

M

mega

10 6

106

G

G

千兆

giga

10 9

109

T

T

太拉

tera

10 12

1012

P

P

佩塔

peta

10月15日

1015

E

E

考试

exa

10月15日

1015

原始 SPICE 元素模型和指令直接传递给 ngspice,无需 KiCad 重新格式化数值供 ngspice 使用。ngspice 使用不同的、不区分大小写的表示法:1 兆 (10⁶ )表示为1Meg,而1M1 毫 ( 10⁻³ ) 表示为 。根据所选的兼容模式,ngspice 可能不支持与 KiCad 相同的数值表示法,因此在使用原始 SPICE 元素和仿真指令时应格外小心。

SPICE指令

SPICE directives

可以通过在原理图的文本字段中输入指令来添加 SPICE 指令。这种方法便于定义默认仿真类型。文本字段中支持的指令列表如下:

It is possible to add SPICE directives by placing them in text fields on a schematic sheet. This approach is convenient for defining the default simulation type. The list of supported directives in text fields is:

  • 以点号开头的指令(例如.tran 10n 1m

  • Directives starting with a dot (e.g. .tran 10n 1m)

  • 电感器的耦合系数(例如K1 L1 L2 0.89

  • Coupling coefficients for inductors (e.g. K1 L1 L2 0.89)

无法使用文本字段添加其他组件。

It is not possible to place additional components using text fields.

如果原理图文本中包含仿真命令,则打开仿真器时,仿真器将使用该仿真命令。但是,您可以在“仿真命令”对话框中对其进行更改。

If a simulation command is included in schematic text, the simulator will use it as the simulation command when you open the simulator. However, you can override it in the Simulation Command dialog.

有关 SPICE 指令的更多详细信息,请参阅ngspice 文档。

Refer to the ngspice documentation for more details about SPICE directives.

运行模拟

Running simulations

仿真电路在原理图编辑器中绘制,但仿真在仿真器窗口中运行。

Circuits for simulation are drawn in the Schematic Editor, but simulations are run in the Simulator window.

创建仿真原理图后,需要执行以下步骤才能运行仿真:

After creating a schematic for simulation, the following steps are needed to run a simulation:

  1. 在原理图编辑器中 单击“检查”“仿真器”模拟器图标 ,或使用顶部工具栏中的按钮打开仿真器窗口。

  2. Open the Simulator window by clicking InspectSimulator in the Schematic Editor or using the button in the top toolbar.

  3. 点击“模拟”“新建分析标签…” ( Ctrl+N ) 或使用 按钮,创建至少一个分析sim 添加地块 24。这样您可以选择模拟类型并配置其选项。这些选项的说明 如下。每个分析都有自己的标签页,您可以创建多个分析。创建分析后,可以通过“模拟”“编辑分析标签…”或点击按钮来调整其选项sim 命令 24

  4. Create at least one analysis by clicking SimulationNew Analysis Tab…​ (Ctrl+N) or using the button. This lets you choose a type of simulation and configure its options. These options are explained below. Each analysis has its own tab, and multiple analyses can be created. The options for an analysis can be adjusted after it is created with SimulationEdit Analysis Tab…​ or by clicking on the button.

  5. 点击“模拟”“运行模拟”R)或点击按钮即可运行模拟模拟运行 24。此操作仅在当前分析选项卡中运行模拟。点击按钮可停止正在运行的模拟sim stop 24

  6. Run the simulation by clicking SimulationRun Simulation (R) or by clicking the button. This only runs the simulation in the active analysis tab. You can stop a running simulation at its current point by clicking the button.

  7. 查看仿真结果。大多数分析结果会以图表形式呈现;您需要选择要绘制的信号。其他分析结果则会打印在输出日志窗口中。

  8. Examine the simulation results. Most analyses result in plots; for these you will need to select the signals to be plotted. Other analyses print their results in the output log window.

模拟设置完成后,可以将配置保存到 工作簿中。

模拟器窗口

Simulator window

主模拟对话框

模拟器窗口分为几个部分:

The simulator window is divided into several sections:

  • 窗口顶部有一个工具栏,上面有常用操作的按钮。

  • The top of the window has a toolbar with buttons for commonly used actions.

  • 窗口的主要部分以图形方式显示仿真结果。仿真需要运行,并且需要从可用信号列表中选择信号或进行探测,然后信号才会显示在图中。

  • The main part of the window graphically shows the simulation results. The simulation needs to run and signals need to be selected from the list of available signals or probed before they are displayed in the plot.

  • 在绘图面板下方,输出日志窗口显示来自 ngspice 仿真引擎的日志。某些类型的分析会在此处输出结果。

  • Below the plot panel, the output log window shows logs from the ngspice simulation engine. Some types of analyses print their results here.

  • 窗口右侧显示信号列表、活动光标列表、测量值以及根据仿真结果调整组件值的调谐工具。

  • The right side of the window displays a list of signals, a list of active cursors, measurements, and a tuning tool for adjusting component values based on simulation results.

模拟类型

Simulation types

每项模拟都属于一种特定类型的分析。以下是可用的分析类型:

Each simulation is a specific type of analysis. The following analysis types are available:

  • OP  — 直流操作点

  • OP — DC Operating Point

  • 直流 扫描分析

  • DC — DC Sweep Analysis

  • 交流电 ——交流电小信号分析

  • AC — AC Small-signal Analysis

  • TRAN  — 瞬态分析

  • TRAN — Transient Analysis

  • PZ  — 极零点分析

  • PZ — Pole-zero Analysis

  • 噪声 — 噪声分析

  • NOISE — Noise Analysis

  • SP  ——S参数分析

  • SP — S-parameter Analysis

  • 快速傅里叶变换 (FFT)  — 频率成分分析

  • FFT — Frequency-content Analysis

以下将详细介绍每种分析类型及其选项。您可以在创建分析时(sim 添加地块 24按钮)或通过编辑现有分析(sim 命令 24 按钮)进行配置。这些分析类型的详细说明请参见 ngspice 文档

Each analysis type and its options are explained below. You can configure an analysis when you create it ( button) or by editing an existing analysis ( button). These analysis types are explained in more detail in the ngspice documentation.

配置仿真的另一种方法是在原理图的文本字段中输入 SPICE 指令。任何与仿真命令相关的文本字段指令都会被对话框中选择的设置覆盖。这意味着仿真运行后,对话框会覆盖原理图指令,直到重新打开仿真器为止。
工作点分析(OP)
OP 分析窗口

计算电路的直流工作点。此分析没有其他选项。

Calculates the DC operating point of the circuit. This analysis has no options.

工作点分析不会生成任何图表结果。结果会打印在输出日志窗口中。您还可以将此分析计算出的节点电压和器件电流作为 注释显示在原理图中。

Operating point analyses do not have any plotted results. Results are printed in the output log window. You can also display the node voltages and device currents calculated by this analysis as annotations in the schematic.

直流扫描分析(DC)
直流分析窗口

计算电路在扫描一个或两个参数时的直流特性。可扫描的参数如下:

Calculates the DC behavior of the circuit while sweeping one or two parameters. The following parameters can be swept:

  • 独立电压源的值

  • value of an independent voltage source

  • 独立电流源的价值

  • value of an independent current source

  • 电阻器的值

  • value of a resistor

  • 模拟温度

  • simulation temperature

DC 分析有以下选项,此处列出了这些选项及其对应的 ngspice 参数名称:

DC analyses have the following options, which are listed here with the corresponding ngspice parameter name:

  • 扫描类型:要扫描的变量类型。它可以是电压源、电流源、电阻器或仿真温度。

  • Sweep type: the type of variable to sweep. This can be a voltage source, a current source, a resistor, or the simulation temperature.

  • :要扫描的特定电压源、电流源或电阻器(srcnam)。该列表包含原理图中相应类型的每个元件。温度扫描时禁用此功能。

  • Source: the particular voltage source, current source, or resistor to sweep (srcnam). The list is populated with each item in the schematic of the relevant type. It is disabled for temperature sweeps.

  • 起始值:扫描的起始值(vstart)。

  • Starting value: the starting value for the sweep (vstart).

  • 最终值:扫描的结束值(vstop)。

  • Final value: the ending value for the sweep (vstop).

  • 增量步长:每次扫描过程中增加的值的量(vincr)。增量越小,输出点越多。

  • Increment step: the amount to increase the value at each step of the sweep (vincr). Smaller increments result in more output points.

如果启用了源 2,则可以使用相同的选项同时扫描第二个源。扫描两个源时,对于源 2 的每个值,源 1 都会在其整个范围内进行扫描。换句话说,源 2 的每个值都会生成一条单独的曲线,每条曲线都显示了在源 2 保持恒定于特定值的情况下,源 1 的完整扫描过程。

If Source 2 is enabled, the same options are available to simultaneously sweep a second source. When sweeping two sources, Source 1 is swept over its entire range for each value of Source 2. In other words, each value for Source 2 results in a separate curve, and each curve shows a full sweep of Source 1 with Source 2 held constant at a particular value.

点击“交换源”按钮,即可将源 1 与源 2 交换。

Clicking the Swap sources buttons swaps Source 1 with Source 2.

输出结果以图表形式显示。

The output is displayed as a plot.

交流小信号分析(AC)
交流分析窗口

计算电路在受到激励信号作用下的小信号交流特性。执行十倍频程的激励频率扫描。

Calculates the small-signal AC behavior of the circuit in response to a stimulus. Performs a decade sweep of stimulus frequency.

要进行交流分析,您必须选择每个十年周期要测量的点数以及十年周期扫描的起始频率和结束频率。

To run an AC analysis you must choose a number of points to measure per decade and the start and end frequencies for the decade sweep.

AC 分析有以下选项,此处列出了这些选项及其对应的 ngspice 参数名称:

AC analyses have the following options, which are listed here with the corresponding ngspice parameter name:

  • 每十年的点数:每十年要计算的点数(nd)。

  • Number of points per decade: the number of points to calculate per decade (nd).

  • 起始频率:要分析的频率范围的下限(fstart)。

  • Start frequency: the lower bound of the frequency range to analyze (fstart).

  • 停止频率:要分析的频率范围的上限(fstop)。

  • Stop frequency: the upper bound of the frequency range to analyze (fstop).

输出结果以波特图的形式显示(输出幅值和相位与频率的关系)。

The output is displayed as a Bode plot (output magnitude and phase vs. frequency).

瞬态分析(TRAN)
瞬态分析窗口

计算电路随时间变化的特性。

Calculates the time-varying behavior of the circuit.

瞬态分析有以下选项,此处列出了这些选项及其对应的ngspice参数名称:

Transient analyses have the following options, which are listed here with the corresponding ngspice parameter name:

  • 时间步长:建议的时间步长(tstep)。

  • Time step: a suggested time step (tstep).

  • 最终时间:模拟结束的时间(tstop)。

  • Final time: the time at which the simulation will end (tstop).

  • 初始时间:模拟开始的时间(tstart)。如果未指定,则默认为 0。

  • Initial time: the time at which the simulation will start (tstart). If not specified, this defaults to 0.

  • 最大时间步长:最大时间步长(tmax)。如果未指定,则默认为建议的时间步长或总模拟时长除以 50,取两者中较小者。

  • Max time step: the maximum time step (tmax). If not specified, this defaults to the suggested time step or the total simulation duration divided by 50, whichever is smaller.

  • 使用初始条件:如果启用此选项,仿真器将不会在开始瞬态仿真之前计算静态工作点。相反,仿真将使用.ic指令和单元IC参数中指定的初始条件。这与 ngspice 的选项相对应uic

  • Use initial conditions: if enabled, the simulator will not calculate the quiescent operating point before starting the transient simulation. Instead, the simulation will use the initial conditions specified in a .ic directive and element IC parameters. This corresponds to ngspice’s uic option.

输出结果以图表形式显示。

The output is displayed as a plot.

极零点分析(PZ)
瞬态分析窗口

计算电路小信号(交流)传递函数的极点和零点。

Calculates the poles and zeroes of the small-signal (AC) transfer function of the circuit.

极零点分析有以下选项,此处列出了这些选项及其对应的ngspice参数名称:

Pole-zero analyses have the following options, which are listed here with the corresponding ngspice parameter name:

  • 传递函数:选择以输出电压除以输入电压或输出电压除以输入电流来计算传递函数。这分别对应于 ngspice 的vol相应cur选项。

  • Transfer function: selects between calculating the transfer function as output voltage divided by input voltage or output voltage divided by input current. These correspond to ngspice’s vol and cur options, respectively.

  • 输入:输入节点(node1)和输入的参考节点(node2)。

  • Input: the input node (node1) and the reference node for the input (node2).

  • 输出:输出节点(node3)和输出的参考节点(node4)。

  • Output: the output node (node3) and the reference node for the output (node4).

  • 查找:选择计算极点和零点、仅计算极点或仅计算零点。这些分别对应于 ngspice 的 `--polars` pzpol`--polars` 和 ` zer--zeros` 选项。

  • Find: selects between calculating poles and zeroes, only poles, or only zeroes. These correspond to ngspice’s pz, pol, and zer options, respectively.

工作点分析不生成任何图表结果。结果会打印在输出日志窗口中。

Operating point analyses do not have any plotted results. Results are printed in the output log window.

噪声分析(NOISE)
噪声分析窗口

计算电路中各器件产生的噪声,包括输出噪声和输入参考噪声。可以绘制电路的噪声频谱(V/√Hz 或 A/√Hz),并报告指定频率范围内的总噪声。此外,还可以选择单独报告每个器件的噪声贡献。

Calculates the noise generated by the devices in the circuit, both as output noise and input-referred noise. The noise spectrum (V/√Hz or A/√Hz) of the circuit can be plotted, and the total noise over the specified frequency range is reported. Optionally, the noise contributions of each device are reported individually.

噪声分析有以下选项,此处列出了这些选项及其对应的ngspice参数名称:

Noise analyses have the following options, which are listed here with the corresponding ngspice parameter name:

  • 测量节点:测量输出噪声的节点(output)。

  • Measured node: the node at which output noise is measured (output).

  • 参考节点:用于测量输出噪声的参考节点(ref)。输出噪声的计算方法为:被测节点的噪声减去参考节点的噪声。如果未指定,则默认为接地节点。

  • Reference node: the reference node for measuring the output noise (ref). The output noise is calculated as the noise at the measured node minus the noise at the reference node. If it is not specified, the default is the ground node.

  • 噪声源:指在计算输入参考噪声时被视为电路输入的源src。该噪声源必须指定交流幅值,即必须具有一个ac参数。

  • Noise source: a source that is considered the circuit’s input for the purposes of calculating input-referred noise (src). The source must specify an AC magnitude, i.e. the source must have an ac parameter.

  • 每十年的点数:每十年要计算的点数(pts)。

  • Number of points per decade: the number of points to calculate per decade (pts).

  • 起始频率:要分析的频率范围的下限(fstart)。

  • Start frequency: the lower bound of the frequency range to analyze (fstart).

  • 停止频率:要分析的频率范围的上限(fstop)。

  • Stop frequency: the upper bound of the frequency range to analyze (fstop).

  • 保存所有噪声发生器的噪声贡献:如果启用此选项,则会保存并报告各个噪声发生器的噪声幅度。如果禁用此选项,则仅报告指定频率范围内的总输出噪声和输入参考噪声。

  • Save contributions from all noise generators: if enabled, noise magnitudes of individual noise generators are saved and reported. If disabled, only the overall output and input-referred noise over the specified frequency range are reported.

可以绘制输出噪声频谱和输入参考噪声频谱。指定频率范围内的总噪声值会打印在输出日志窗口中。

The output and input-referred noise spectra can be plotted. Total noise values for the specified frequency range are printed in the output log window.

S参数分析(SP)
S参数分析窗口

计算电路的散射参数、导纳矩阵和阻抗矩阵。也可选择计算噪声电流相关矩阵。请注意,此分析至少需要两个电压源,并按照 ngspice 手册中的说明配置为射频端口。

Calculates the scattering parameters, admittance matrix, and impedance matrix for the circuit. Optionally calculates the noise current correlation matrix. Note that this analysis requires at least two voltage sources configured as RF ports as described in the ngspice manual.

S 参数分析有以下选项,此处列出了这些选项及其对应的 ngspice 参数名称:

S-parameter analyses have the following options, which are listed here with the corresponding ngspice parameter name:

  • 每十年的点数:每十年要计算的点数(nd)。

  • Number of points per decade: the number of points to calculate per decade (nd).

  • 起始频率:要分析的频率范围的下限(fstart)。

  • Start frequency: the lower bound of the frequency range to analyze (fstart).

  • 停止频率:要分析的频率范围的上限(fstop)。

  • Stop frequency: the upper bound of the frequency range to analyze (fstop).

  • 计算噪声电流相关矩阵:如果启用,还会计算噪声电流相关矩阵。这与 ngspice 的donoise 选项相对应。

  • Compute noise current correlation matrix: if enabled, the noise current correlation matrix is also calculated. This corresponds to ngspice’s donoise option.

输出结果以图表形式显示。

The output is displayed as a plot.

频率成分分析(FFT)
FFT 分析窗口

根据现有分析选项卡计算快速傅里叶变换 (FFT)。现有分析中的任何信号都可以用作 FFT 的输入。信号使用汉宁窗进行加窗处理。

Calculates an FFT based on an existing analysis tab. Any of the signals from an existing analysis can be used as inputs to the FFT. The signals are windowed using a Hanning window.

FFT 分析有以下选项,此处列出了这些选项及其对应的 ngspice 参数名称:

FFT analyses have the following options, which are listed here with the corresponding ngspice parameter name:

  • 输入信号:待进行快速傅里叶变换 (FFT) 的信号。FFT 将分别应用于每个选定的信号。

  • Input signals: the signal(s) to perform an FFT on. An FFT is independently applied to each selected signal.

  • 在执行 FFT 之前对输入进行线性化:启用此选项后,输入向量在执行 FFT 之前会被转换为具有等距时间点的向量。对应于 ngspice 的linearize命令。

  • Linearize inputs before performing FFT: When enabled, the input vector is converted to have equidistant time points prior to performing the FFT. Corresponds to ngspice’s linearize command.

输出结果以图表形式显示。

The output is displayed as a plot.

其他模拟设置

有几种模拟选项适用于所有类型的模拟。这些选项位于对话框底部。

There are several simulation options that apply to all types of simulations. These are located at the bottom of the dialog.

  • 添加 .include 库指令的完整路径:如果启用,SPICE 模型的相对路径将在 SPICE 网表中转换为绝对路径。

  • Add full path for .include library directives: if enabled, relative paths to SPICE models will be converted to absolute paths in the SPICE netlist.

  • 保存所有电压:如果启用此选项,仿真器会将每个节点的电压保存到仿真结果中,以便绘制电压图。这对应于.save allSPICE 网表中的 ngspice 命令。如果禁用此选项,电压将不会保存到结果中,因此也无法绘制电压图,除非使用 SPICE 指令手动探测节点电压。

  • Save all voltages: if enabled, the simulator will save voltages for each node in the simulation results so that they can be plotted. This corresponds to ngspice’s .save all command in the SPICE netlist. If disabled, voltages will not be saved in the results, and therefore cannot be plotted, unless a SPICE directive is used to manually probe a node voltage.

  • 保存所有电流:如果启用此选项,仿真器会将流经每个器件引脚的电流保存到仿真结果中,以便绘制电流图。这对应于.probe alliSPICE 网表中的 ngspice 命令。如果禁用此选项,电流将不会保存到结果中,因此也无法绘制电流图,除非使用 SPICE 指令手动探测电流。

  • Save all currents: if enabled, the simulator will save currents through each device pin in the simulation results so that they can be plotted. This corresponds to ngspice’s .probe alli command in the SPICE netlist. If disabled, currents will not be saved in the results, and therefore cannot be plotted, unless a SPICE directive is used to manually probe a current.

  • 保存所有功耗:如果启用此选项,仿真器会将每个器件的功耗保存到仿真结果中,以便绘制功耗曲线。这对应于.probe P(<device>)原理图中每个器件的 SPICE 网表中的 ngspice 命令。如果禁用此选项,功耗将不会保存到结果中,因此也无法绘制功耗曲线,除非使用 SPICE 指令手动探测功耗。

  • Save all power dissipations: if enabled, the simulator will save power dissipations for each device in the simulation results so that they can be plotted. This corresponds to ngspice’s .probe P(<device>) command in the SPICE netlist for each device in the schematic. If disabled, power dissipations will not be saved in the results, and therefore cannot be plotted, unless a SPICE directive is used to manually probe a power dissipation.

  • 保存所有数字事件数据:如果启用此选项,仿真器将保存数字(事件驱动型)仿真模型的数字事件数据。这与 ngspice 的.esave all命令相对应。如果禁用此选项,数字事件数据将被丢弃。

  • Save all digital event data: if enabled, the simulator will save digital event data for digital (event-driven) simulation models. This corresponds to ngspice’s .esave all command. If disabled, digital event data will be discarded.

  • “兼容模式”下拉菜单用于选择仿真器加载模型时使用的兼容模式。“用户配置”选项指的是用户的.spiceinitngspice 配置文件。兼容模式的详细说明请参阅 ngspice 文档

  • The Compatibility mode dropdown selects the compatibility mode that the simulator uses to load models. The User configuration option refers to the user’s .spiceinit ngspice configuration file. Compatibility modes are described in the ngspice documentation.

查看模拟结果

Viewing simulation results

每个分析都有自己的标签页,包含独立的图表、信号列表和输出日志窗口。运行模拟时,只有当前激活的标签页才会更新。这样就可以比较不同运行的模拟结果。

Each analysis has its own tab, containing its own separate plot, signal list, and output log window. Only the active tab is updated when a simulation is run. In this way it is possible to compare simulation results between different runs.

大多数分析类型的仿真结果都以图表的形式呈现 。然而,直流工作点 (OP) 分析和极零点 (PZ) 分析不会生成图表,而是将 结果打印在仿真器窗口底部的输出日志中。此外,OP 分析结果还可以作为 注释显示在原理图画布上。

Simulation results from most analysis types are visualized as plots. However, DC Operating Point (OP) and Pole-zero (PZ) analyses do not generate plots. Instead, they print their results in the output log at the bottom of the simulator window. OP analysis results can additionally be displayed as annotations on the schematic canvas.

绘制结果

Plotted results

大多数分析都会以图表的形式展示结果。图表的类型取决于分析的具体内容:例如,瞬态仿真会显示信号值随时间的变化,而交流仿真则会以波特图的形式展示结果。

Most types of analyses display their results in a plot. The type of plot depends on the analysis: transient simulations display signal values over time, for example, while AC simulations display results in a Bode plot.

您可以使用以下手势缩放和平移图表:

You can zoom and move a plot using the following gestures:

  • 滚动鼠标滚轮进行放大/缩小。Shift,,Ctrl并且Alt可以根据原理图编辑器首选项中的模拟器面板中的配置来修改滚动操作。

  • Scroll mouse wheel to zoom in/out. Shift, Ctrl, and Alt can modify the scroll action depending on the configuration in the Simulator panel in the Schematic Editor Preferences.

  • 右键单击打开上下文菜单以调整视图。

  • Right click to open a context menu to adjust the view.

  • 绘制选区矩形以放大选定区域。

  • Draw a selection rectangle to zoom in the selected area.

  • 拖动光标标记即可移动光标。

  • Drag a cursor marker to move the cursor.

可在活动绘图中绘制的信号列表显示在模拟器窗口右侧的“信号”窗格中。可绘制的信号类型如下:

The list of signals that can be plotted in the active plot is shown in the Signals pane on the right side of the simulator window. The following types of signals can be plotted:

  • 节点电压:原理图中每个网络的电压,显示为 V(<net>)

  • Node voltages: the voltage of each net in the schematic, displayed as V(<net>).

  • 器件节点电流:原理图中每个器件的电流,以I(<device>)或表示I(<device:terminal>)。对于双端器件,器件电流以单个信号表示,对应于流入器件引脚 1 的电流。对于具有两个以上端子的器件,每个端子的电流都是一个单独的信号。

  • Device node currents: the current for each device in the schematic, displayed as I(<device>) or I(<device:terminal>). For two-terminal devices, the device’s current is listed as a single signal corresponding to the current into the device’s pin 1. For devices with more than two terminals, the current into each terminal is a separate signal.

  • 设备功耗:每个组件消耗的功率,显示为P(<device>)

  • Device power dissipations: the power dissipated by each component, displayed as P(<device>).

  • 用户自定义信号:根据其他信号定义的自定义信号。用户自定义信号可以是任意数学表达式。用户自定义信号的一个常见用途是绘制电压差,即两点之间的电压。

  • User-defined signals: custom signals defined as an expression based on other signals. User-defined signals can be arbitrary mathematical expressions. One common use for user-defined signals is to plot a voltage differential, i.e. the voltage between two points.

要绘制信号,请选中​​绘图列中目标信号旁边的复选框。要从图中移除信号,请取消选中该信号的复选框。

To plot a signal, check the box in the plot column next to the signal of interest. To remove a signal from the plot, clear its checkbox.

您还可以使用“探测原理图”工具交互式地选择要绘制的信号。要激活该工具,请使用“仿真”“探测原理图… ” ( P) 或单击 ( 模拟探针 24) 按钮。激活后,该工具允许您单击原理图中的元素以绘制相应的信号。根据您单击的内容,将探测不同类型的信号:

You can also interactively select signals to plot by using the Probe Schematic tool. To activate the tool, use SimulationProbe Schematic…​ (P) or click the () button. When activated, the tool lets you click elements in the schematic to plot the corresponding signal. Different types of signals are probed depending on what you click:

  • 点击导线即可绘制该线路的电压。将鼠标悬停在导线上时,该线路会高亮显示,表示可以探测其电压。

  • Clicking on a wire plots the voltage of that net. When you hover over a wire, the net is highlighted to indicate that its voltage can be probed.

  • 点击符号引脚即可绘制该引脚的电流。当鼠标悬停在引脚上时,光标会变成电流钳图标,表示点击即可探测电流。

  • Clicking on a symbol pin plots the current going into that pin. When you hover over a pin, the cursor changes to a current clamp to indicate that clicking will probe the current.

KiCad 不支持 ngspice 的.plot指令。因此,在使用 KiCad 运行仿真时,该指令无效。
剧情设定和外观

您可以通过点击信号网格中每个信号对应的颜色字段来设置各个信号的颜色。您可以从预定义的调色板(“已定义颜色”)中选择,也可以选择自定义颜色(“颜色选择器”)。您可以通过“视图”“深色模式图表”将绘图背景颜色从黑色切换到白色(这将影响所有分析选项卡,而不仅仅是当前活动选项卡)。

Colors of individual signals may be set by clicking the color field associated with each signal in the Signals grid. You may choose from a predefined palette (Defined Colors), or select a custom color (Color Picker). You can toggle the color of the plot background from black to white with ViewDark Mode Plots (this affects all analysis tabs, not just the active tab).

可以在“分析设置”窗口的“绘图设置”选项卡中配置许多绘图设置(sim 命令 24按钮)。

Many plot settings can be configured in the Plot Setup tab of the Analysis Setup window ( button).

模拟图设置
  • 固定比例:启用此功能后,垂直和/或水平绘图比例将固定在指定的范围内。如果坐标轴的比例已固定,则手动缩放不会影响该坐标轴。

  • Fixed scale: when enabled, this fixes the vertical and/or horizontal plot scales to the specified ranges. Manually zooming will not affect an axis if its scale is fixed.

  • 显示网格:启用后,将在绘制的信号后面显示网格。您也可以通过“视图”“显示网格”来打开或关闭网格。

  • Show grid: when enabled, a grid will be shown behind the plotted signals. You can also turn the grid on or off with ViewShow Grid.

  • 显示图例:启用后,图表上将显示已启用信号的图例。您可以拖动图例来重新定位它。

  • Show legend: when enabled, a legend will be shown on the plot for the enabled signals. You can reposition the legend by dragging it.

  • 虚线电流/相位:启用后,表示电流(瞬态仿真)或相位(交流仿真)的曲线信号将以虚线而非实线显示。您也可以通过“视图”“虚线电流/相位”启用此设置。

  • Dotted current/phase: when enabled, plotted signals representing current (transient simulations) or phase (AC simulations) are displayed using dotted lines instead of solid lines. You can also enable this setting with ViewDotted Current/Phase.

  • 边距:此设置控制图表两侧的边距。

  • Margins: this controls the padding on each side of the plot.

光标

为了进行精确测量,绘图窗口中提供了光标。您可以通过选中右侧信号网格中对应信号的“光标 1”“光标 2”复选框,为信号添加光标。

For precise measurement, cursors are available in the plot window. You can add a cursor to a signal by checking the Cursor 1 or Cursor 2 checkbox for the signal in the signal grid on the right.

添加光标后,每个光标的水平位置会以三角形标记中的数字显示在绘图显示顶部。您可以通过单击并拖动标记来重新定位光标。每个光标的垂直位置与其分配的信号相对应。每个光标的水平和垂直值都显示在模拟器窗口右侧的光标网格中。如果光标 1 和光标 2 都已启用,则还会显示它们之间的差值。

Once cursors have been added, the horizontal position of each cursor is shown by a number in a triangular marker at the top of the plot display. You can reposition each cursor by clicking and dragging its marker. The vertical position of each cursor tracks its assigned signal. The horizontal and vertical value for each cursor are shown in the cursor grid on the right of the simulator window. If cursors 1 and 2 are both enabled, the difference between them is also shown.

要精确定位光标,您可以直接在光标网格中编辑其水平位置。您还可以通过右键单击光标网格中的值,然后单击相应数值的“格式”来修改显示格式(单位范围和有效数字位数)。

To precisely position a cursor, you can directly edit its horizontal position in the cursors grid. You can also modify the display format (unit range and number of significant digits) by right clicking a value in the cursors grid and clicking Format for the relevant quantity.

测量

您可以为任何绘制的信号添加自动计算的测量值,例如最小值、平均值或峰峰值测量值。

You can add automatically calculated measurements for any plotted signal, such as a minimum, average, or peak-to-peak measurement.

测量是对模拟产生的所有数据进行的,而不仅仅是当前缩放设置下绘图窗口中可见的数据。
即使未选中要绘制的信号(即未勾选“绘制”复选框),也可以对其进行测量。

要向信号添加预定义测量值,请在信号网格中右键单击信号并选择测量值。以下测量值可用:

To add a predefined measurement to a signal, right click on a signal in the signals grid and select a measurement. The following measurements are available:

  • 测量最小值:测量整个信号的最小值

  • Measure Min: measures the minimum value of the entire signal

  • 测量最大值:测量整个信号的最小值

  • Measure Max: measures the minimum value of the entire signal

  • 测量均方根值:测量整个信号的均方根值

  • Measure RMS: measures the root-mean-square value of the entire signal

  • 测量峰峰值:测量整个信号的峰峰值。

  • Measure Peak-to-peak: measures the peak-to-peak value of the entire signal

  • 最小值时间测量:测量整个信号达到最小值的时间。

  • Measure Time of Min: measures the time at which the minimum value of the entire signal occurs

  • 测量最大值时间:测量整个信号达到最大值的时间。

  • Measure Time of Max: measures the time at which the maximum value of the entire signal occurs

  • 测度积分:计算整个信号的时间积分值

  • Measure Integral: computes the time integral value of the entire signal

  • 执行傅里叶分析:基于指定的基频对选定信号执行傅里叶分析。计算基频谐波的幅度以及总谐波失真。此测量仅适用于瞬态分析,其结果会打印在仿真日志窗口中,而不是测量面板中。

  • Perform Fourier Analysis: performs a Fourier analysis of the selected signal based on a specified fundamental frequency. Calculates the amplitude of the harmonics of the fundamental as well as the total harmonic distortion. This measurement is only available for transient analyses, and its results are printed in the simulation log window instead of in the measurement panel.

测量结果显示在模拟器窗口右下角的“测量”窗格中。多个测量结果会在此区域中显示为多行。您可以右键单击测量值,然后单击 “删除测量”来删除它。要修改测量结果的显示格式(单位范围和有效数字位数),请右键单击该值,然后单击“ 设置值格式…”

Measurement results are displayed in the Measurement pane at the lower right of the Simulator window. Multiple measurements will display as multiple rows in this area. You can delete a measurement by right clicking it and clicking Delete Measurement. To modify the display format of a measurement result (unit range and number of significant digits), right click the value and click Format Value…​.

上述上下文菜单选项是直接在“测量”窗格中指定测量值的快捷方式。要手动创建新测量值,请单击“测量”窗格中的空白行,然后输入 ngspice 测量函数。您还可以通过单击现有测量值来对其进行编辑。有关测量值及其语法的更多信息,请参阅 ngspice 手册。

The above context menu options are a shortcut for directly specifying measurements in the the Measurement pane. To manually create a new measurement, click in an empty row in the Measurement pane and type in an ngspice measurement function. You can also edit existing measurements by clicking on them. For more information about measurements and their syntax, refer to the ngspice manual.

数值结果

Numerical results

虽然大多数分析结果都以图表形式呈现,但直流工作点 (OP) 分析和极零点 (PZ) 分析并不生成图表。相反,这些分析会将结果以文本形式打印在仿真日志窗口中。

While most analyses display their results as plots, DC Operating Point (OP) and Pole-zero (PZ) analyses do not result in plots. Instead, these analyses print their results as text in the simulation log window.

sim pz 结果
工作点注释

对于工作点分析,还可以向原理图添加注释,指示节点的工作点电压和电流值。可以使用 “视图”“显示工作点电压”来显示或隐藏每个节点的工作点电压注释。可以使用“视图”“显示工作点电流”来显示或隐藏每个符号引脚的工作点电流注释。这些注释对所有节点或引脚均全局显示或隐藏。您可以在“原理图设置”的“格式”面板中控制这些注释的格式 。

For the OP analysis, annotations can also be added to the schematic indicating the operating point voltage and current values at the nodes. Operating point voltage annotations can be shown or hidden for every node with ViewShow OP Voltages. Operating point current annotations can be shown or hidden for every symbol pin with ViewShow OP Currents. These annotations are globally shown or hidden for every node or every pin. You can control the formatting of these annotations in the Formatting panel of Schematic Setup.

模拟操作电压

您还可以使用文本变量显示工作点结果。使用文本变量需要更多设置工作,但可以更好地控制数据的显示方式。例如,您可以使用文本变量仅显示特定的电压或电流,或者控制特定值的显示格式。您还可以使用文本变量显示功耗测量值。

You can also display operating point results using text variables. Using text variables requires more work to set up but provides more control over how the data is displayed. For example, you can use text variables to display only certain voltages or currents, or to control the display formatting of particular values. You can also use text variables to display power dissipation measurements.

要使用文本变量显示网络的工作点电压,请先为该网络添加一个 标签,然后为该标签添加一个字段。标签可以包含任何文本,只要它包含${OP}文本变量即可。文本变量可以包含格式说明符,格式为 `<value>` ${OP.<precision><unit>},但精度和单位都是可选的。精度是要显示的有效数字位数,默认值为 3。单位是要使用的单位,包括前缀,例如 ` mVmV` 表示毫伏。

To use text variables to display an operating point voltage for a net, add a label to the net, then add a field to that label. The label can contain any text as long as it contains the ${OP} text variable. The text variable can contain formatting specifiers in the form ${OP.<precision><unit>}, but both the precision and unit are optional. Precision is the number of significant digits to display, which is 3 by default. Unit is the unit to use, including a prefix, such as mV for millivolts.

例如,一个包含文本的标签字段Vout: ${OP},连接到工作点电压为 5.123V 的网络,显示为“Vout: 5.12V”。文本${OP.4mV}显示为“5123mV”,${OP.2}显示为“5.1V”, ${OP.mV}显示为“512mV”。

As an example, a label field containing the text Vout: ${OP}, attached to a net with an operating point voltage of 5.123V, displays as "Vout: 5.12V". The text ${OP.4mV} displays as "5123mV", ${OP.2} displays as "5.1V", and ${OP.mV} displays as "512mV".

使用文本变量显示器件引脚的工作点电流与之类似,但使用的是符号字段而非标签字段。该字段可以包含任何文本,只要它包含${OP:<pin>}文本变量即可。引脚可以指定为引脚名称或引脚编号。对于双端器件,可以省略引脚,此时将报告器件引脚 1 的电流。与电压一样,也支持相同的可选格式说明符,格式为 ${OP:<pin>.<precision><unit>}

Using text variables to display an operating point current into a device pin is similar, but uses symbol fields instead of label fields. The field can contain any text as long as it contains the ${OP:<pin>} text variable. The pin can be specified as a pin name or a pin number. For two-terminal devices, the pin can be omitted, and the current into the device’s pin 1 will be reported. The same optional formatting specifiers are supported as for voltages, in the form ${OP:<pin>.<precision><unit>}.

例如,在引脚 1(引脚名称C)工作点电流为 5.123mA 的符号中,包含文本的符号字段Ic: ${OP:C}显示为“Ic: 5.12mA”。文本${OP:C.2mA}显示为“5.1mA”,${OP:1.4} 显示为“5.123mA”,以及${OP:C.A}显示为“0.00512A”。

For example, in a symbol with an operating point current of 5.123mA through pin 1 (pin name C), a symbol field containing the text Ic: ${OP:C} displays as "Ic: 5.12mA". The text ${OP:C.2mA} displays as "5.1mA", ${OP:1.4} displays as "5.123mA", and ${OP:C.A} displays as "0.00512A".

您还可以使用文本变量来显示设备的功耗。其工作方式与显示电流相同,只是用power文本代替引脚名称或编号。例如,对于工作点功耗为 5.123mW 的符号,包含文本的符号字段${OP:power.2mW}将显示为“5.1mW”。

You can also use text variables to display a device’s power dissipation. This works identically to current, but with power instead of a pin name or number. For example, in a symbol with an operating point power dissipation of 5.123mW, a symbol field containing ${OP:power.2mW} displays as "5.1mW".

别忘了将标签字段或符号字段设置为可见,否则将不会显示。

用户自定义信号

User-defined signals

除了原理图中列出的来自网络的信号之外,您还可以定义自己的信号,这些信号在大多数方面都与普通信号类似。用户自定义信号是通过对一个或多个基本信号进行数学运算来定义的。

In addition to the list of signals that come from the nets in the schematic, you can define your own signals which behave like normal signals in most respects. User defined signals are defined as mathematical operations on one or more basic signals.

模拟用户自定义信号

要添加用户自定义信号,请打开“用户自定义信号”对话框( 选择“仿真”“用户自定义信号… ” 按钮sim 添加信号 24),然后添加信号。新信号将出现在信号网格中,您可以像使用其他信号一样绘制和使用它。用户自定义信号也会包含在 OP 结果中。

To add a user-defined signal, open the User-defined Signal dialog with SimulationUser-defined Signals…​ ( button) and add a signal. The new signal will appear in the Signal grid, where it can be plotted and used like any other signal. User-defined signals are also included in OP results.

与随着仿真进行而逐步绘制的普通信号不同,用户定义的信号直到仿真完成才会绘制。

用户自定义信号的一个用途是绘制差分电压,即两个任意节点之间的电压。例如,要绘制网络 A 和 B 之间的电压差,可以使用表达式 `V<sub>A</sub> = V<sub> B /v1</sub> /v2+ .../v1-/v2V(/v1)-V(/v2)V(/v1,/v2)

One use for user-defined signals is to plot a differential voltage, i.e. the voltage between two arbitrary nodes. For example, to plot the voltage difference between the nets /v1 and /v2, you can create a user-defined signal with the expression /v1-/v2 and then plot it. This expression could also be written in a number of different ways, for example V(/v1)-V(/v2) or V(/v1,/v2), which are both equivalent.

用户自定义信号可以使用多种数学函数。要查看函数列表,请单击“用户自定义信号”对话框中的“语法帮助”链接。有关每个函数的详细信息,请参阅 ngspice 手册。

A number of mathematical functions are available for use in user-defined signals. To see a list, click the Syntax help link in the User-defined Signals dialog. Refer to the ngspice manual for details on each of these functions.

网络名称可能包含对 ngspice 解释器具有特殊含义的特殊字符。特别是,ngspice 会将短横线字符 ( ) 解释为减法运算。为了确保网络名称被正确解释,在用户自定义信号中引用 -网络名称时,请用双引号 ( ) 将其括起来。"

调谐组件

Tuning components

您可以在仿真界面内调整原理图中基本元件的值,从而根据仿真结果方便地调整元件值。每次调整元件值后,仿真都会使用新的元件值重新运行。您可以调整无源电阻器、电感器和电容器的值,也可以调整直流电压源和电流源的电压或电流。

It is possible to adjust the value of basic components in the schematic from within the simulation interface, which lets you conveniently adjust component values based on simulation results. Each time the component value is tuned, the simulation is re-run with the new component value. You can tune the value of passive resistors, inductors, and capacitors, or the voltage or current of DC voltage and current sources.

只有在运行会生成图表的分析时才能调整组件。换句话说,在运行工作点分析时无法调整组件。

要调整某个元件,请使用“仿真”“添加调谐值…”、快捷键T调谐图标工具栏中的按钮,然后在原理图中单击要调整的元件。这会在仿真器窗口的右下角添加该元件的调谐控件。可以同时调整多个元件,每个元件都有一个单独的调谐控件。

To tune a component, use SimulationAdd Tuned Value…​, the keyboard shortcut T, or the button in the toolbar, and then click on the component to tune in the schematic. This adds a tuning control for that component in the bottom right corner of the simulator window. Multiple components can be tuned at once, with a separate tuning control per component.

模拟器调校器
  • 顶部文本框设置调谐范围的上限。

  • The top text field sets the top end of the tuning range.

  • 底部文本框设置调谐范围的下限。

  • The bottom text field sets the bottom end of the tuning range.

  • 中间的文本框用于设置仿真中使用的实际组件值。该值也可以通过滑块进行调整。

  • The middle text field sets the actual component value that is used in the simulation. This value can also be adjusted using the slider.

  • “保存”按钮会将原理图符号的值更新为调整后的值。在按下“保存”按钮之前,原理图符号将保持其原始值。

  • The Save button updates the schematic symbol with the tuned value. Until you press the Save button, the schematic symbol will keep its original value.

  • 垃圾桶图标按钮会将组件从“调谐”面板中移除,并恢复其原始值。

  • The button removes the component from the Tune panel and restores its original value.

此外,还可以将元件值限制为特定系列优选值中的值,例如 E24、E48、E96 或 E192 系列。当需要将元件值限制为市售零件时,此功能尤其有用。

In addition, it is possible to restrict the component values to those from a particular series of Preferred Values — either of the E24, E48, E96 or E192 series. This is particularly useful when it is necessary to restrict component values to commercially available parts.

保存仿真设置

Saving simulation setups

您可以将仿真设置保存到工作簿中。工作簿是存储仿真设置信息的文件,包括已配置的分析及其设置、每个分析绘制的信号、用户自定义信号、测量值、光标和显示设置。工作簿可以保存并在以后重新加载,以便在新会话中恢复先前配置的设置。工作簿可以包含多个仿真:例如,它可以包含您在工作过程中添加的瞬态分析、工作点分析和交流分析的单独选项卡。

You can save a simulation setup in a workbook. Workbooks are files that store information about a simulation setup, including which analyses are configured and what their settings are, which signals are plotted for each analysis, user-defined signals, measurements, cursors, and display settings. A workbook can be saved and reloaded later to restore the previously configured settings in a new session. Workbooks can include more than one simulation: for example, it may contain separate tabs for transient, operating point, and AC analyses which you added as you worked.

您可以使用“文件”“保存工作簿”保存工作簿,使用“文件”“打开工作簿”加载 工作簿。模拟器打开时,会自动加载最近使用的工作簿。

You can save a workbook using FileSave Workbook and load one using FileOpen Workbook. The most recently used workbook is automatically loaded when the simulator is opened.

工作簿存储仿真设置信息,但不存储仿真结果。您可以使用“文件”“导出当前图为 PNG…”“文件”“导出当前图为 CSV… ”将仿真结果导出为 PNG(图形)或 CSV(仿真数据值) 。要重新生成存储在工作簿中的仿真结果,请在“仿真器”窗口中选择相应的分析选项卡,然后再次运行仿真(R选择“仿真”“运行仿真”)。

导出仿真结果

Exporting simulation results

KiCad 的仿真器提供了两种导出结果的方法:

KiCad’s simulator offers two ways to export results:

  • 以 PNG(便携式网络图形格式)图像的形式呈现模拟数据图,

  • as a PNG (Portable Network Graphics format) image of a simulation data plot,

  • 以纯文本文件形式提供模拟数据值,格式为 CSV(逗号分隔值)。

  • as a plain text file of simulation data values, in CSV (Comma-Separated Value) format.

只有能够生成图表的模拟结果(见上文)才能导出为图像或 CSV 文件。OP 和 PZ 分析的结果无法以这种方式导出。

Only simulations that produce plots (see above) can be exported as an image or a CSV file. The results of OP and PZ analyses cannot be exported in this way.

将结果导出为图形

Exporting results as graphics

当前可见的模拟器图可以使用命令“文件将当前图导出为 PNG…”导出为 PNG 文件。

The currently-visible Simulator plot may be exported as a PNG file using the command FileExport Current Plot as PNG…​.

保存的图像的大小和宽高比将与模拟器中显示的图表相匹配。

The size and aspect-ratio of the saved image will match that of the displayed plot in the Simulator.

您还可以使用“文件”“导出当前绘图到剪贴板”将当前绘图的图像复制到剪贴板,或者使用“文件”“导出当前绘图到原理图”将当前绘图的图像插入原理图。将绘图导出到原理图等同于将绘图导出到剪贴板,然后将其粘贴到原理图中。

You can also copy an image of the active plot to the clipboard using FileExport Current Plot to Clipboard, or insert an image of the active plot into the schematic using FileExport Current Plot to Schematic. Exporting a plot to the schematic is equivalent to exporting the plot to the clipboard and then pasting it into the schematic.

将结果导出为数值数据

Exporting results as numerical data

可以使用命令“文件将当前图形导出为 CSV…”将当前可见的模拟器图形导出为 CSV 文件。

The currently-visible Simulator plot may be exported as a CSV file using the command FileExport Current Plot as CSV…​.

模拟图中的数据以多列形式导出。具体格式取决于分析类型。通常情况下,会有多列数据,每列对应一个选定的绘图变量。文件的第一行是标题行,包含该列中变量的名称(例如“时间”、“V(/Vout)1”或类似名称)。

The data in the simulation plot is exported as multiple columns. The precise format is dependent upon the analysis type. In general, there will be multiple columns of data, one corresponding to each variable selected for plotting. The first row of the file is a header row, containing the name of the variable in the column (i.e. 'time', 'V(/Vout)1' or similar).

导出为 CSV 时,只有使用“绘图”复选框选择的变量才会包含在导出的文件中。
导出文件中的数据包含显示整个图表时会绘制的所有数据。即使放大图表以显示特定区域,情况依然如此,导致输出文件包含的数据量可能超出用户预期。
此函数导出的数据以分号 ( ;) 而非逗号分隔。读取此数据的程序可能需要配置为以分号作为分隔符。

故障排除模拟

Troubleshooting simulations

有时仿真会失败,可能伴有错误报告,也可能没有。仔细阅读错误信息,认真设计并导入待仿真电路到 KiCad 中,并充分利用 KiCad、ngspice 和 SPICE 的官方文档以及论坛上其他用户的信息,都非常有帮助,往往能找到解决方案。

Sometimes a simulation will fail, either with or without errors being reported. Paying attention to the error messages reported, taking care in the development and entry into KiCad of the circuit to be simulated, and making use of the KiCad, ngspice and general SPICE documentation and information from fellow users in forums is very worthwhile and can often point the way to a solution.

对于不熟悉 SPICE、ngspice 或电路仿真的用户来说,值得注意的是,一些“常见”且有趣的电路有时可能难以进行精确或可靠的仿真。这包括看似简单的电路,例如振荡器,在某些情况下,它们甚至可能根本无法振荡!虽然几乎总是可以构建一个可运行的仿真,但有时这需要比最初看起来更多的 SPICE 经验,或者需要有经验的人的指导。如果您遇到困难,再次强调,阅读 ngspice 文档对于了解良好有效的仿真实践至关重要。

It’s worth noting, for users unfamiliar with SPICE, ngspice or circuit simulation in general that some 'common' and interesting circuits can sometimes be tricky to simulate accurately or reliably. These include apparently simple circuits such as oscillators, which in some cases may fail to oscillate at all! It is nearly always possible to build a working simulation but sometimes this can more require SPICE experience than might be initially apparent, or the guidance of someone who already has it. The ngspice documentation, once again, is worth reading for insights into good and effective simulation practices if you are encountering difficulty.

错误的网表

Incorrect netlist

可以通过“仿真”“显示 SPICE 网表… ” (网表 24按钮)来查看 SPICE 网表。这种故障排除方法需要一定的 SPICE 知识,但发现网表中的错误有助于确定仿真问题的原因,并确认 ngspice 实际处理的是哪个输入。

It is possible to inspect the SPICE netlist with SimulationShow SPICE netlist…​ ( button). This method of troubleshooting requires some SPICE knowledge, but spotting errors in the netlist can help determine the cause of simulation problems, as well as providing confirmation of what input ngspice is actually acting on.

模拟错误信息

Simulation error messages

输出控制台会显示来自模拟器的消息。建议您检查控制台输出,确认没有错误或警告。如果您想分享这些消息,可以方便地选择、复制和粘贴到控制台中。

The output console displays messages from the simulator. It is advisable to check the console output to verify there are no errors or warnings. Messages appearing in the console may be conveniently selected, copied, and pasted if you wish to share them.

常见的错误信息是“时间步长过小”。此信息表示即使使用最小的时间增量,仿真引擎也无法计算仿真中的下一个点。此错误可能由多种原因造成,包括电路中使用的仿真模型或电路本身存在数值收敛问题。此外,电路图绘制错误也可能导致此错误,例如错误地 将引脚分配给仿真模型或忘记提供电源。

A common error message is "timestep too small". This message means that the simulation engine is unable to calculate the next point in the simulation, even when using the minimum possible time increment. This error can have many causes, including numerical convergence issues with a simulation model used in the circuit or with the circuit itself. It can also be caused by mistakes in drawing the circuit, such as incorrectly assigning pins to the simulation model or forgetting to provide a voltage supply.

收敛性问题

Convergence problems

如果仿真在合理的时间内无法收敛(或根本无法收敛),可以添加以下 SPICE 指令。更多信息请参阅 ngspice 手册。

In case the simulation does not converge in a reasonable amount of time (or not at all), it is possible to add the following SPICE directives. More information is available in the ngspice manual.

更改收敛选项可能会导致错误的结果。应谨慎使用这些选项。
.options gmin=1e-10
.options abstol=1e-10
.options reltol=0.003
.options cshunt=1e-15
.options gmin=1e-10
.options abstol=1e-10
.options reltol=0.003
.options cshunt=1e-15
  • gmin是程序允许的最小电导率。默认值为1e-12(1 pS)。

  • gmin is the minimum conductance allowed by the program. The default value is 1e-12 (1 pS).

  • abstol是程序的绝对电流误差容限。默认值为1e-12(1 pA)。

  • abstol is the absolute current error tolerance of the program. The default value is 1e-12 (1 pA).

  • reltol是程序的相对误差容限。默认值为 0.001(0.1%)。

  • reltol is the relative error tolerance of the program. The default value is 0.001 (0.1%).

  • cshunt在电路的每个电压节点到地之间并联一个指定值的电容器。

  • cshunt adds a capacitor of the specified value from each voltage node in the circuit to ground.

仿真引脚分配

Simulation pin assignments

如果仿真运行过程中没有明显错误,但却产生了意料之外的结果,那么值得仔细检查 KiCad 原理图中元件实例的引脚与对应模型的引脚之间的映射关系 是否正确。原理图中的每个模型实例的引脚映射关系都必须正确。

If unexpected results are generated by a simulation despite it running without obvious errors, it is worth double-checking that the assignments between the pins of the part instance in the KiCad schematic and that of the associated model are correct. These have to be correct for each instance of the model in the schematic.

实用小贴士

Helpful hints

以下是一些有用的技巧、提示和建议,可帮助您在 KiCad 中使用 ngspice 进行仿真时获得最佳效果。

Some helpful tips, hints and advice to help you get the most from using ngspice in KiCad for simulation.

ngspice 用户手册是你的好帮手!

The ngspice manual is your friend!

从本质上讲,KiCad 仿真器是功能强大的 ngspice 电路仿真器的用户友好型前端。因此,仿真细节、SPICE 元件的正确使用、模型等问题超出了 KiCad 文档的范围,但很可能在 ngspice 文档本身中得到全面而完整的解答。因此,建议不要忽略这一宝贵的资源

Fundamentally the KiCad Simulator is a user-friendly front-end to the powerful ngspice circuit simulator. Therefore problems with the details of simulation, the correct use of SPICE elements, models, etc. is beyond the scope of the KiCad documentation but is very likely to be fully and completely addressed in the ngspice documentation itself. It’s therefore recommended not to overlook this valuable resource.

KiCad 的更新可能会导致仿真器使用的 ngspice 版本发生变化。您可以在“帮助”“关于 KiCad”对话框的“版本”选项卡中查看特定 KiCad 版本中使用的 ngspice 当前版本。参考在线 ngspice 文档可确保您始终能够获取最新信息。

组织第三方模型

Organizing third-party models

虽然可以将仿真模型(即文件)保存.lib.sub与各个 KiCad 项目关联的目录中,但这很可能会导致在创建仿真时产生大量不必要的模型文件副本。建议创建一个专门的模型存储位置(目录或文件夹),并按制造商或设备类型进行组织,以便存放这些文件。这样,在仿真中就可以直接引用这些位于同一位置的文件。

Although it is certainly possible to keep simulation models (i.e. .lib, .sub files) in the directories associated with individual KiCad projects, this will likely result in unnecessary copies of model files proliferating as you create simulations. Consider creating a dedicated storage location (directory, folder) for models, perhaps organized by manufacturer or device type, to hold these files. Then they may simply be referenced in simulations at a common location.

KiCad库中的仿真符号和模型

Simulation symbols and models in KiCad’s libraries

KiCad 符号库中提供了许多用于仿真的符号 Simulation_SPICE。大多数符号都已预先分配了相应的 SPICE 模型,但您可能需要调整模型参数才能获得所需的仿真结果。

The KiCad libraries provide a number of symbols for simulation in the Simulation_SPICE symbol library. Most of these symbols have SPICE models already assigned as appropriate, although you may need to adjust the model parameters in order to obtain the desired simulation behavior.

符号Simulation_SPICE库包含以下符号:

The Simulation_SPICE symbol library contains the following symbols:

符号名称

Symbol Name

描述

Description

0

0

接地(节点 0)符号。请注意,也可以使用其他库中的标准 GND 符号。

A ground (node 0) symbol. Note that a standard GND symbol from another library can also be used.

BSOURCE

BSOURCE

SPICE B源(非线性相关电压或电流源)的符号。 有关B源的信息,请参阅ngspice手册。

A symbol for a SPICE B-source (nonlinear dependent voltage or current source). Refer to the ngspice manual for information on B-sources.

D

D

二极管符号。请注意,引脚分配适用于仿真和PCB布局。

A diode symbol. Note that the pin assignment is appropriate for both simulation and PCB layout.

资源

ESOURCE

SPICE E源(线性压控电压源)的符号。默认增益为1 V/V。 有关E源的更多信息,请参阅ngspice手册。

A symbol for a SPICE E-source (linear voltage-controlled voltage source). By default it is set up with a gain of 1 V/V. Refer to the ngspice manual for more information on E-sources.

GSOURCE

GSOURCE

SPICE G源(线性压控电流源)的符号。默认增益设置为1 A/V。 有关G源的更多信息,请参阅ngspice手册。

A symbol for a SPICE G-source (linear voltage-controlled current source). By default it is set up with a gain of 1 A/V. Refer to the ngspice manual for more information on G-sources.

我是

IAM

SPICE幅度调制独立电流源的符号。 有关独立电流源的更多信息,请参阅ngspice手册。

A symbol for a SPICE amplitude-modulated independent current source. Refer to the ngspice manual for more information on independent current sources.

IBIS设备

IBIS_DEVICE

代表数字输入引脚的 IBIS 设备符号。此符号未预先配置仿真模型,需与 外部 IBIS设备模型配合使用。

An IBIS device symbol representing a digital input pin. This symbol is not preconfigured with a simulation model. It is intended to be used with an external IBIS model for a device.

IBIS_DEVICE_DIFF

IBIS_DEVICE_DIFF

代表数字差分输入引脚的 IBIS 设备符号。此符号未预配置仿真模型,需与外部 IBIS差分设备模型配合使用。

An IBIS device symbol representing a digital differential input pin. This symbol is not preconfigured with a simulation model. It is intended to be used with an external IBIS model for a differential device.

IBIS_DRIVER

IBIS_DRIVER

代表数字输出引脚的 IBIS 驱动程序符号。此符号未预配置仿真模型,需与 外部 IBIS驱动程序模型配合使用。

An IBIS driver symbol representing a digital output pin. This symbol is not preconfigured with a simulation model. It is intended to be used with an external IBIS model for a driver.

IBIS_DRIVER_DIFF

IBIS_DRIVER_DIFF

代表一对数字差分输出引脚的 IBIS 驱动器符号。此符号未预配置仿真模型,需与外部 IBIS差分驱动器模型配合使用。

An IBIS driver symbol representing a pair of digital differential output pins. This symbol is not preconfigured with a simulation model. It is intended to be used with an external IBIS model for a differential driver.

IDC

IDC

SPICE 直流独立电流源的符号。 有关独立电流源的更多信息,请参阅ngspice 手册。

A symbol for a SPICE DC independent current source. Refer to the ngspice manual for more information on independent current sources.

国际出口贸易中心

IEXP

SPICE 指数型独立电流源的符号。 有关独立电流源的更多信息,请参阅ngspice 手册。

A symbol for a SPICE exponential independent current source. Refer to the ngspice manual for more information on independent current sources.

IPULSE

IPULSE

SPICE脉冲独立电流源的符号。 有关独立电流源的更多信息,请参阅ngspice手册。

A symbol for a SPICE pulsed independent current source. Refer to the ngspice manual for more information on independent current sources.

IPWL

IPWL

SPICE分段线性独立电流源的符号。波形以空间分离的时间-电流对的形式指定。 有关独立电流源的更多信息,请参阅ngspice手册。

A symbol for a SPICE piecewise linear independent current source. The waveform is specified as space-separated time-current pairs. Refer to the ngspice manual for more information on independent current sources.

国际安全财务管理协会

ISFFM

SPICE 单频调频独立电流源的符号。 有关独立电流源的更多信息,请参阅ngspice 手册。

A symbol for a SPICE single-frequency frequency-modulated independent current source. Refer to the ngspice manual for more information on independent current sources.

ISIN

ISIN

SPICE正弦独立电流源的符号。 有关独立电流源的更多信息,请参阅ngspice手册。

A symbol for a SPICE sinusoidal independent current source. Refer to the ngspice manual for more information on independent current sources.

ITRNOISE

ITRNOISE

SPICE瞬态噪声无关电流源的符号。 有关独立电流源的更多信息,请参阅ngspice手册。

A symbol for a SPICE transient noise independent current source. Refer to the ngspice manual for more information on independent current sources.

随机

ITRRANDOM

SPICE瞬态随机独立电流源的符号。 有关独立电流源的更多信息,请参阅ngspice手册。

A symbol for a SPICE transient random independent current source. Refer to the ngspice manual for more information on independent current sources.

新泽西州场外技术教育学院

NJFET

具有漏极、栅极和源极的 N 沟道 JFET 的符号,适用于 3 端 N-JFET 模型。

A symbol for an N-channel JFET with drain, gate, and source terminals, suitable for use with 3-terminal N-JFET models.

NMOS

NMOS

具有漏极、栅极和源极的 N 沟道 MOSFET 的符号,适用于 3 端 N MOSFET 模型。

A symbol for an N-channel MOSFET with drain, gate, and source terminals, suitable for use with 3-terminal N-MOSFET models.

NMOS衬底

NMOS_Substrate

具有漏极、栅极、源极和衬底(体)端子的 N 沟道 MOSFET 的符号,适用于 4 端 N-MOSFET 模型。

A symbol for an N-channel MOSFET with drain, gate, source, and substrate (bulk) terminals, suitable for use with 4-terminal N-MOSFET models.

NPN

NPN

具有集电极、基极和发射极的 NPN 晶体管符号,适用于 3 端 NPN 型号。

A symbol for an NPN transistor with collector, base, and emitter terminals, suitable for use with 3-terminal NPN models.

NPN衬底

NPN_Substrate

具有集电极、基极、发射极和衬底端子的 NPN 晶体管符号,适用于 4 端 NPN 型号。

A symbol for an NPN transistor with collector, base, emitter, and substrate terminals, suitable for use with 4-terminal NPN models.

运算放大器

OPAMP

这是一个通用的单极点运算放大器符号。它包含极点频率、开环增益、失调电压和输出电阻等参数。这些参数可以在 SPICE 模型编辑器对话框的“参数”网格中进行编辑。

A generic single-pole operational amplifier symbol. There are parameters for pole frequency, open loop gain, offset voltage, and output resistance. These parameters can be edited in the Parameters grid of the SPICE Model Editor dialog.

PJFET

PJFET

具有漏极、栅极和源极的 P 沟道 JFET 的符号,适用于 3 端 P-JFET 模型。

A symbol for a P-channel JFET with drain, gate, and source terminals, suitable for use with 3-terminal P-JFET models.

首席营销官

PMOS

具有漏极、栅极和源极的 P 沟道 MOSFET 的符号,适用于 3 端 P-MOSFET 模型。

A symbol for a P-channel MOSFET with drain, gate, and source terminals, suitable for use with 3-terminal P-MOSFET models.

PMOS衬底

PMOS_Substrate

具有漏极、栅极、源极和衬底(体)端子的 P 沟道 MOSFET 的符号,适用于 4 端 P-MOSFET 模型。

A symbol for a P-channel MOSFET with drain, gate, source, and substrate (bulk) terminals, suitable for use with 4-terminal P-MOSFET models.

菲律宾国家警察

PNP

具有集电极、基极和发射极的 PNP 晶体管符号,适用于 3 端 PNP 型号。

A symbol for a PNP transistor with collector, base, and emitter terminals, suitable for use with 3-terminal PNP models.

PNP底物

PNP_Substrate

具有集电极、基极、发射极和衬底端子的 PNP 晶体管符号,适用于 4 端 PNP 型号。

A symbol for a PNP transistor with collector, base, emitter, and substrate terminals, suitable for use with 4-terminal PNP models.

转变

SWITCH

电压控制开关的符号。 有关开关的更多信息,请参阅ngspice 手册。

A symbol for a voltage-controlled switch. Refer to the ngspice manual for more information on switches.

T线

TLINE

传输线的符号。默认情况下,它被设置为无损传输线,但也可用于有损传输线。 有关传输线的更多信息,请参阅ngspice 手册。

A symbol for a transmission line. By default it is set up as a lossless transmission line but it can also be used for a lossy transmission line. Refer to the ngspice manual for more information on transmission lines.

VAM

VAM

SPICE幅度调制独立电压源的符号。 有关独立电压源的更多信息,请参阅ngspice手册。

A symbol for a SPICE amplitude-modulated independent voltage source. Refer to the ngspice manual for more information on independent voltage sources.

直流电压

VDC

SPICE 直流独立电压源的符号。 有关独立电压源的更多信息,请参阅ngspice 手册。

A symbol for a SPICE DC independent voltage source. Refer to the ngspice manual for more information on independent voltage sources.

VEXP

VEXP

SPICE 指数型独立电压源的符号。 有关独立电压源的更多信息,请参阅ngspice 手册。

A symbol for a SPICE exponential independent voltage source. Refer to the ngspice manual for more information on independent voltage sources.

电压表差

VOLTMETER_DIFF

差分电压表符号,可用于测量两个任意节点之间的电压。引脚 1+和 2 之间的电压差-作为地参考电压输出到out引脚 3。

A differential voltmeter symbol that can be used to measure the voltage between two arbitrary nodes. The voltage difference between the + and - pins is output as a ground-referenced voltage on the out pin.

VPULSE

VPULSE

SPICE脉冲独立电压源的符号。 有关独立电压源的更多信息,请参阅ngspice手册。

A symbol for a SPICE pulsed independent voltage source. Refer to the ngspice manual for more information on independent voltage sources.

VPWL

VPWL

SPICE分段线性独立电压源的符号。波形以空间分离的时间-电压对的形式指定。 有关独立电压源的更多信息,请参阅ngspice手册。

A symbol for a SPICE piecewise linear independent voltage source. The waveform is specified as space-separated time-voltage pairs. Refer to the ngspice manual for more information on independent voltage sources.

VSFFM

VSFFM

SPICE 单频调频独立电压源的符号。 有关独立电压源的更多信息,请参阅ngspice 手册。

A symbol for a SPICE single-frequency frequency-modulated independent voltage source. Refer to the ngspice manual for more information on independent voltage sources.

VSIN

VSIN

SPICE正弦独立电压源的符号。 有关独立电压源的更多信息,请参阅ngspice手册。

A symbol for a SPICE sinusoidal independent voltage source. Refer to the ngspice manual for more information on independent voltage sources.

VTRNOISE

VTRNOISE

SPICE瞬态噪声无关电压源的符号。 有关独立电压源的更多信息,请参阅ngspice手册。

A symbol for a SPICE transient noise independent voltage source. Refer to the ngspice manual for more information on independent voltage sources.

VTRRANDOM

VTRRANDOM

SPICE瞬态随机独立电压源的符号。 有关独立电压源的更多信息,请参阅ngspice手册。

A symbol for a SPICE transient random independent voltage source. Refer to the ngspice manual for more information on independent voltage sources.

库中的大多数符号Simulation_SPICE都使用 内置模型,但也有一些符号使用了来自仿真模型库的外部模型Simulation_SPICE.sp。仿真模型库是一个单独的文件,与符号库位于同一文件夹中。该仿真模型库还包含一些 SPICE 模型,这些模型可能对其他符号的配合使用很有用。

Most of these symbols in the Simulation_SPICE library use built-in models, but several symbols use external models from the Simulation_SPICE.sp simulation model library. The simulation model library is a separate file in the same folder as the symbol library. This simulation model library also contains SPICE models that may be useful for use with other symbols.

仿真Simulation_SPICE.sp模型库包含以下模型:

The Simulation_SPICE.sp simulation model library contains the following models:

型号名称

Model Name

描述

Description

kicad_builtin_opamp

kicad_builtin_opamp

这是一个通用的单极点运算放大器模型。该模型被符号库中的 OPAMP 符号使用Simulation_SPICE,其引脚顺序与任何标准单单元运算放大器符号兼容。模型包含极点频率、开环增益、失调电压和输出电阻等参数。这些参数可以在 SPICE 模型编辑器对话框的“参数”网格中进行编辑。

A generic single-pole operational amplifier model. This model is used by the OPAMP symbol in the Simulation_SPICE symbol library, and the pins are ordered appropriately for use with any standard single-unit opamp symbol. There are parameters for pole frequency, open loop gain, offset voltage, and output resistance. These parameters can be edited in the Parameters grid of the SPICE Model Editor dialog.

kicad_builtin_opamp_dual

kicad_builtin_opamp_dual

这是 kicad_builtin_opamp 模型的双通道版本,参数相同。该模型未分配给Simulation_SPICE符号库中的任何符号,但引脚顺序已正确设置,可与标准双通道运算放大器符号一起使用。

A dual version of the kicad_builtin_opamp model, with the same parameters. This model is not assigned to any symbols in the Simulation_SPICE symbol library, but the pins are ordered appropriately for use with standard dual opamp symbols.

kicad_builtin_opamp_quad

kicad_builtin_opamp_quad

这是 kicad_builtin_opamp 模型的四路版本,参数相同。该模型未分配给Simulation_SPICE符号库中的任何符号,但引脚顺序已正确设置,可与标准四路运算放大器符号一起使用。

A quad version of the kicad_builtin_opamp model, with the same parameters. This model is not assigned to any symbols in the Simulation_SPICE symbol library, but the pins are ordered appropriately for use with standard quad opamp symbols.

kicad_builtin_varistor

kicad_builtin_varistor

这是一个通用压敏电阻模型。该模型未分配给 Simulation_SPICE符号库中的任何符号。它包含阈值电压、动态电阻和漏电阻等参数。这些参数可以在 SPICE 模型编辑器对话框的“参数”网格中进行编辑。

A generic varistor model. This model is not assigned to any symbols in the Simulation_SPICE symbol library. There are parameters for threshold voltage, dynamic resistance, and leakage resistance. These parameters can be edited in the Parameters grid of the SPICE Model Editor dialog.

kicad_builtin_vdiff

kicad_builtin_vdiff

差分电压表模型。前两个端子之间的电压差作为接地参考电压输出到第三个端子。符号库中的 VOLTMETER_DIFF 符号使用此模型Simulation_SPICE

A differential voltmeter model. The voltage difference between the first two terminals is output as a ground-referenced voltage on the third terminal. This model is used by the VOLTMETER_DIFF symbol in the Simulation_SPICE symbol library.

高级主题

Advanced Topics

配置和定制

Configuration and Customization

KiCad 文档的这一部分尚未编写完成。感谢您的耐心等待,我们的志愿者文档编写团队正在努力更新和扩充文档。

文本变量

Text variables

KiCad 支持文本变量,允许您在多种文本中按名称引用预定义的变量。KiCad 会将变量名替换为分配给该变量的文本字符串。这种替换发生在变量名在变量替换语法中出现的任何位置${VARIABLENAME}

KiCad supports text variables, which allow you to reference predefined variables by name in many kinds of text. KiCad will substitute the variable name with the text string assigned to the variable. This substitution happens anywhere the variable name is used inside the variable replacement syntax of ${VARIABLENAME}.

例如,您可以创建一个名为 `<variable>` 的变量VERSION,并将其文本替换设置为 `<variable> 1.0`。现在,在原理图中的任何文本对象中,您都可以输入 ` <variable> ${VERSION}`,KiCad 会将其显示为 `<variable>` 1.0。如果您将 `<variable>` 的值更改为 `<variable>` 2.0,则所有包含 `<variable>` 的文本对象${VERSION}都会自动更新。您还可以混合使用普通文本和变量。例如,您可以创建一个文本对象,其中包含文本 `<variable>`,Version: ${VERSION}该文本将显示为 `<variable>` Version: 1.0

For example, you could create a variable named VERSION and set the text substitution to 1.0. Now, in any text object in the schematic, you can enter ${VERSION} and KiCad will display this as 1.0. If you change the value to 2.0, every text object that includes ${VERSION} will be updated automatically. You can also mix regular text and variables. For example, you can create a text object with the text Version: ${VERSION} which will be displayed as Version: 1.0.

您可以在 原理图电路板设置对话框中定义项目文本变量。之所以称之为项目文本变量,是因为它们是为整个项目定义的,因此在原理图编辑器中定义的项目文本变量也可以在电路板编辑器中使用,反之亦然。

You can define project text variables in the schematic or board setup dialogs. These are referred to as project text variables because they are defined for the whole project, so a project text variable defined in the Schematic Editor can also be used in the Board Editor, and vice versa.

此外,还有一些内置的系统文本变量。系统文本变量可能在某些上下文中可用,而在其他上下文中不可用。以下系统文本变量可用于原理图文本、标签名称、标签字段、层级图纸字段、符号文本、符号字段和绘图图纸字段。PCB 编辑器中也提供了一些变量

There are also a number of built-in system text variables. System text variables may be available in some contexts and not others. The following system text variables can be used in schematic text, label names, label fields, hierarchical sheet fields, symbol text, symbol fields, and drawing sheet fields. There are also a number of variables that can be used in the PCB Editor.

除非另有说明,否则分层工作表字段中使用的变量指的是分层工作表的属性,而不是父工作表的属性。例如,${#} 在分层工作表字段中使用时,返回子工作表的页码;但在父工作表的图形文本中使用时,返回父工作表的页码。

Variables used in hierarchical sheet fields refer to the properties of the hierarchical sheet, not the parent, unless otherwise noted. For example, ${#} returns the subsheet’s page number when used in a hierarchical sheet field, but the parent sheet’s page number when used in graphic text in the parent sheet.

变量也可以用作字段名称。如果字段名称是变量名,则其值会自动设置为该变量的值。例如,在一个项目中,如果项目变量MY_VAR设置为`<project_variable_name> MY_VALUE`,则用户创建的名为 `<symbol_field_name>` 的符号字段${MY_VAR}的值会自动设置为 `<project_variable_name>` ${MY_VAR},该值随后会解析为 ` <project_variable_name> MY_VALUE`。如果字段的“显示名称” 属性已设置,则变量名将显示为字段名称,例如 `<field_name>` MY_VAR: MY_VALUE

Variables can also be used for field names. A field with a variable as its name will automatically have its value set to the same variable. For example, in a project with a project variable MY_VAR set to MY_VALUE, a user-created symbol field named ${MY_VAR} will automatically have its value set to ${MY_VAR}, which will then resolve to MY_VALUE. If the field’s Show Name property is set, the variable’s name will be displayed as the field name, for example MY_VAR: MY_VALUE.

变量名 描述

#

#

图纸编号。

Sheet number.

##

##

原理图图纸总数。

Total number of schematic sheets.

COMMENT1-COMMENT9

COMMENT1 - COMMENT9

图纸Comment<n>区域的内容。

Contents of drawing sheet’s Comment<n> field.

COMPANY

COMPANY

图纸Company区域的内容。

Contents of drawing sheet’s Company field.

CURRENT_DATE

CURRENT_DATE

今天的日期,ISO格式。

Today’s date, in ISO format.

FILENAME

FILENAME

根原理图的文件名,带文件扩展名。

Filename of the root schematic sheet, with a file extension.

FILEPATH

FILEPATH

根原理图的完整文件路径,包括文件扩展名。

Full file path of the root schematic sheet, with a file extension.

ISSUE_DATE

ISSUE_DATE

图纸Issue Date区域的内容。

Contents of drawing sheet’s Issue Date field.

KICAD_VERSION

KICAD_VERSION

当前版本的 KiCad。此变量仅在绘图图纸字段中可用。

Current version of KiCad. This variable is only available in drawing sheet fields.

PAPER

PAPER

当前图纸的纸张尺寸。此变量仅在绘图图纸字段中可用。

Current sheet’s paper size. This variable is only available in drawing sheet fields.

PROJECTNAME

PROJECTNAME

项目名称,不包含文件扩展名。

Project name, without a file extension.

REVISION

REVISION

图纸Revision区域的内容。

Contents of drawing sheet’s Revision field.

SHEETFILE

SHEETFILE

当前工作表的文件名,包括文件扩展名。

Filename of the current sheet, with a file extension.

SHEETNAME

SHEETNAME

当前工作表的名称。

Sheet name of the current sheet.

SHEETPATH

SHEETPATH

当前工作表的路径。

Sheet path of the current sheet.

TITLE

TITLE

图纸Title区域的内容。

Contents of drawing sheet’s Title field.

<variablename>

<variablename>

项目文本变量 的内容<variablename>

Contents of project text variable <variablename>.

<fieldname>

<fieldname>

符号字段、符号属性、层级工作表字段或标签字段的内容<fieldname>。字段只能从其父对象内部访问,因此符号字段可以从符号内的其他文本或字段访问,层级工作表字段可以在工作表内部或工作表的其他字段中访问。

Contents of symbol field, symbol attribute, hierarchical sheet field, or label field <fieldname>. Fields can only be accessed from within their parent object, so symbol fields can be accessed from other text or fields within the symbol, and hierarchical sheet fields can be accessed within the sheet or in other sheet fields of the sheet.

内置字段和用户自定义字段均可用。内置字段全部使用大写字母:例如,要访问符号的值,请使用${VALUE}

Both built-in and user-defined fields are available. Built-in fields use all uppercase letters: for example, to access a symbol’s value, use ${VALUE}.

内置符号字段为 DATASHEET,,,,,,,,,,,,,,,,,,。 DESCRIPTION​​​​​ ​​​ ​​​​​FOOTPRINTFOOTPRINT_LIBRARYFOOTPRINT_NAMENET_CLASS(<pin_number>)NET_NAME(<pin_number>)OPPIN_NAME(<pin_number>)REFERENCESHORT_NET_NAME(<pin_number>)SHORT_REFERENCESYMBOL_DESCRIPTIONSYMBOL_KEYWORDSSYMBOL_LIBRARYSYMBOL_NAMEUNITVALUE

Built-in symbol fields are DATASHEET, DESCRIPTION, FOOTPRINT, FOOTPRINT_LIBRARY, FOOTPRINT_NAME, NET_CLASS(<pin_number>), NET_NAME(<pin_number>), OP, PIN_NAME(<pin_number>), REFERENCE, SHORT_NET_NAME(<pin_number>), SHORT_REFERENCE, SYMBOL_DESCRIPTION, SYMBOL_KEYWORDS, SYMBOL_LIBRARY, SYMBOL_NAME, UNIT, VALUE.

内置符号属性有DNPEXCLUDE_FROM_BOARDEXCLUDE_FROM_BOMEXCLUDE_FROM_SIM。如果设置了属性,这些属性会展开为属性的友好名称(例如,Excluded from board对于EXCLUDE_FROM_BOARDDNP对于DNP),如果未设置属性,则会展开为空字符串。

Built-in symbol attributes are DNP, EXCLUDE_FROM_BOARD, EXCLUDE_FROM_BOM, and EXCLUDE_FROM_SIM. These attributes expand to the friendly name of the attribute if the attribute is set (e.g. Excluded from board for EXCLUDE_FROM_BOARD and DNP for DNP), or to an empty string if the attribute is not set.

内置的工作表字段有SHEETFILESHEETNAMESHEETPATH。它们分别指子工作表的文件名、工作表名称和工作表路径,而不是父工作表的。

Built-in sheet fields are SHEETFILE, SHEETNAME, and SHEETPATH. These refer to the child sheet’s filename, sheet name, and sheet path, respectively, rather than the parent sheet’s.

内置标签字段有CONNECTION_TYPE, NET_CLASS, NET_NAME, OP, SHORT_NET_NAME, 和INTERSHEETREFS(仅限全局标签)。

Built-in label fields are CONNECTION_TYPE, NET_CLASS, NET_NAME, OP, SHORT_NET_NAME, and INTERSHEETREFS (global labels only).

<refdes>:<fieldname>

<refdes>:<fieldname>

<fieldname>符号中字段或属性的内容<refdes>

Contents of field or attribute <fieldname> in symbol <refdes>.

内置字段和用户自定义字段均可用。内置字段全部使用大写字母:例如,要访问值U1,请使用 ${U1:VALUE}

Both built-in and user-defined fields are available. Built-in fields use all uppercase letters: for example, to access the value of U1, use ${U1:VALUE}.

内置符号字段为 DATASHEET,,,,,,,,,,,,,,,,,。 DESCRIPTION​​​​​ ​​​ ​​​​FOOTPRINTFOOTPRINT_LIBRARYFOOTPRINT_NAMENET_CLASS(<pin_number>)NET_NAME(<pin_number>)OPPIN_NAME(<pin_number>)REFERENCESHORT_NET_NAME(<pin_number>)SYMBOL_DESCRIPTIONSYMBOL_KEYWORDSSYMBOL_LIBRARYSYMBOL_NAMEUNITVALUE

Built-in symbol fields are DATASHEET, DESCRIPTION, FOOTPRINT, FOOTPRINT_LIBRARY, FOOTPRINT_NAME, NET_CLASS(<pin_number>), NET_NAME(<pin_number>), OP, PIN_NAME(<pin_number>), REFERENCE, SHORT_NET_NAME(<pin_number>), SYMBOL_DESCRIPTION, SYMBOL_KEYWORDS, SYMBOL_LIBRARY, SYMBOL_NAME, UNIT, VALUE.

内置符号属性有DNPEXCLUDE_FROM_BOARDEXCLUDE_FROM_BOMEXCLUDE_FROM_SIM。如果设置了属性,这些属性会展开为属性的友好名称(例如,Excluded from board对于EXCLUDE_FROM_BOARDDNP对于DNP),如果未设置属性,则会展开为空字符串。

Built-in symbol attributes are DNP, EXCLUDE_FROM_BOARD, EXCLUDE_FROM_BOM, and EXCLUDE_FROM_SIM. These attributes expand to the friendly name of the attribute if the attribute is set (e.g. Excluded from board for EXCLUDE_FROM_BOARD and DNP for DNP), or to an empty string if the attribute is not set.

注意:如果被引用的符号<refdes>被重新注释,即收到新的引用指示符,则 <refdes>文本变量将自动更新为新的引用指示符,以便文本变量继续引用同一个符号。

Note: If the symbol referenced by <refdes> is reannotated, i.e. receives a new reference designator, <refdes> in the text variable will be automatically updated to the new reference designator so that the text variable continues to reference the same symbol.

ERC_ERROR <errorname>

ERC_ERROR <errorname>

生成一个名为`<error_name>` 的 ERC 错误<errorname>。大括号内的所有内容将解析为空字符串,而大括号后的所有内容将包含在 ERC 违规的描述性文本中。`text` 变量必须位于文本项的开头。

Generates an ERC error named <errorname>. Everything inside the braces resolves to an empty string, while everything after the braces is included in the descriptive text for the ERC violation. The text variable must be at the beginning of the text item.

例如,包含以下内容的文本项${ERC_ERROR TODO}Calculate resistor value将显示为文本“计算电阻值”,并生成名为“TODO”的 ERC 错误,描述为“计算电阻值”。

For example, a text item containing ${ERC_ERROR TODO}Calculate resistor value would display as the text "Calculate resistor value" and generate a ERC error named "TODO" with the description "Calculate resistor value".

ERC_WARNING <warningname>

ERC_WARNING <warningname>

生成名为 的ERC 警告<warningname>。其行为与 相同ERC_ERROR,只是生成的是警告而不是错误。

Generates an ERC warning named <warningname>. This behaves the same as ERC_ERROR, except a warning is generated rather than an error.

数据库库

Database Libraries

数据库库是一种 KiCad 符号库,它将元件数据存储在外部 SQL 数据库中。数据库库本身不包含任何符号或封装定义,而是引用其他 KiCad 库中的符号和封装。每个数据库库条目都一个 KiCad 符号(来自其他库)映射到一组属性(字段),通常还会映射到一个 KiCad 封装(来自封装库)。

A database library is a type of KiCad symbol library that holds data about parts in an external SQL database. Database libraries do not contain any symbol or footprint definitions by themselves. Instead, they reference symbols and footprints found in other KiCad libraries. Each database library entry maps a KiCad symbol (from another library) to a set of properties (fields) and usually a KiCad footprint (from a footprint library).

使用数据库库,您可以利用 KiCad 符号和封装创建完全定义的零件(有时称为原子零件),而无需将所有零件属性存储在符号库中。外部数据库可以链接到第三方工具,用于管理零件数据和生命周期。数据库库的工作流程通常比标准的 KiCad 库工作流程更复杂,因此,这种类型的库通常仅用于能够更高效地管理大型完全定义零件库的场景(例如在组织或团队环境中)。

Using database libraries allows you to create fully-defined parts (sometimes called atomic parts) out of KiCad symbols and footprints without needing to store all the part properties in a symbol library. The external database can be linked to third-party tools for managing part data and lifecycles. Database library workflows are generally more complex than the standard KiCad library workflows, and so this type of library is typically only used in situations where it makes managing a large library of fully-defined parts more efficient (such as in organization or team settings).

KiCad 不提供用于编辑 SQL 数据库或定义数据库库的图形用户界面 (GUI)。用户需要自行寻找最合适的流程和工具链来创建和更新数据库。一些用户可能希望通过第三方数据库客户端直接编辑数据库,而另一些用户则可能使用其他第三方软件,例如零件生命周期管理 (PLM) 工具来创建和编辑数据。

KiCad does not provide a GUI for editing a SQL database or defining a database library. It is up to the user to find the most appropriate workflow and toolchain for creating and updating the database itself. Some users may want to directly edit the database through a third-party database client, and some may use other third-party software such as a part lifecycle management (PLM) tool to create and edit data.

在数据库库中,通常包含一个或多个,每个表代表一种类型的元件(例如电阻器或电容器)。每个表可以拥有独立的模式,这意味着不同类型的元件可以具有不同的属性,这些属性会被转换为 KiCad 中的符号字段。每个表必须包含一个唯一的 ID 列,该列用作从该表中放置的符号的标识符。此唯一 ID 通常是一个元件编号(制造商的元件编号或内部组织元件编号)。每个表还必须包含一个列,其中包含与 KiCad 符号的映射,格式为 `<symbol>:<symbol>` LibraryNickname:SymbolName。该映射LibraryNickname必须与 KiCad 库表中存在的符号库相匹配。表还可以包含一个列,其中包含 KiCad 封装,格式为 `<include>:<include>` LibraryNickname:FootprintName。如果存在此列,则从该表放置的符号将包含封装映射。

In a database library, there are one or more tables that generally represent a single type of part (such as Resistors or Capacitors). Each table can have an independent schema, meaning that different types of parts can have different properties that are translated into symbol fields in KiCad. Each table must have a unique ID column which is used as the identifier for a symbol placed from that table. This unique ID will typically be a part number (either a manufacturer’s part number, or an internal organization part number). Each table must also have a column that contains a mapping to a KiCad symbol, in the form LibraryNickname:SymbolName. The LibraryNickname must match a symbol library that is present in the KiCad library tables. Tables may also contain a column containing a KiCad footprint, in the form LibraryNickname:FootprintName. If this column is present, symbols placed from the table will include a footprint mapping.

表格还可以包含任意附加列,这些列可以选择性地映射到 KiCad 中的符号字段。KiCad 数据库库配置文件控制这些字段的命名方式、是否显示这些字段以及是否将这些字段包含在符号选择器中显示的数据中。

Tables may also contain arbitrary additional columns that may optionally be mapped to symbol fields in KiCad. The KiCad database library configuration file controls how these fields should be named, whether or not to make the fields visible, and whether or not to include the fields in the data displayed in the Symbol Chooser.

数据库库配置文件

Database Library Configuration Files

要创建数据库库,您必须创建一个配置文件,其中包含 KiCad 连接到数据库并从表中检索数据所需的信息。将下面的模板复制到一个新文件中,并保存为kicad_dbl.txt 文件。然后,您可以使用“配置符号库”对话框将此文件添加到全局符号库表中。

To create a database library, you must create a configuration file that contains the necessary information for KiCad to connect to your database and retrieve data from tables. Copy the template below into a new file and save it with a kicad_dbl extension. You can then add this file to your global symbol library table using the Configure Symbol Libraries dialog.

{
    "meta": {
        "version": 0
    },
    "name": "My Database Library",
    "description": "A database of components",
    "source": {
        "type": "odbc",
        "dsn": "",
        "username": "",
        "password": "",
        "timeout_seconds": 2,
        "connection_string": ""
    },
    "libraries": [
        {
            "name": "Resistors",
            "table": "Resistors",
            "key": "Part ID",
            "symbols": "Symbols",
            "footprints": "Footprints",
            "fields": [
                {
                    "column": "MPN",
                    "name": "MPN",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": true,
                    "inherit_properties": true
                },
                {
                    "column": "Value",
                    "name": "Value",
                    "visible_on_add": true,
                    "visible_in_chooser": true,
                    "show_name": false
                }
            ],
            "properties": {
                "description": "Description",
                "footprint_filters": "Footprint Filters",
                "keywords": "Keywords",
                "exclude_from_bom": "No BOM",
                "exclude_from_board": "Schematic Only"
            }
        }
    ]
}
{
    "meta": {
        "version": 0
    },
    "name": "My Database Library",
    "description": "A database of components",
    "source": {
        "type": "odbc",
        "dsn": "",
        "username": "",
        "password": "",
        "timeout_seconds": 2,
        "connection_string": ""
    },
    "libraries": [
        {
            "name": "Resistors",
            "table": "Resistors",
            "key": "Part ID",
            "symbols": "Symbols",
            "footprints": "Footprints",
            "fields": [
                {
                    "column": "MPN",
                    "name": "MPN",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": true,
                    "inherit_properties": true
                },
                {
                    "column": "Value",
                    "name": "Value",
                    "visible_on_add": true,
                    "visible_in_chooser": true,
                    "show_name": false
                }
            ],
            "properties": {
                "description": "Description",
                "footprint_filters": "Footprint Filters",
                "keywords": "Keywords",
                "exclude_from_bom": "No BOM",
                "exclude_from_board": "Schematic Only"
            }
        }
    ]
}
数据库库文件采用 JSON 格式,并遵循标准的 JSON 语法规则。您可以使用 JSON 验证器或代码检查工具(通常在线提供)来检查文件是否存在语法错误。
配置源

KiCad 目前仅支持通过 ODBC 连接到 SQL 数据库。您可以使用 DSN 或连接字符串进行连接。如果提供 DSN 名称,则会使用可选的 `<DSN_NAME>`usernamepassword `<DSN_NAME>` 字段连接到该 DSN。如果提供连接字符串,则会忽略 `<DSN_NAME>`、dsn` <DSN_NAME> username` 和password`<DSN_NAME>` 字段。连接字符串将直接传递给 ODBC 驱动程序,因此您可以包含 ODBC 驱动程序支持的任何参数。

KiCad currently only supports ODBC connections to SQL databases. You can either connect with a DSN or a connection string. If a DSN name is supplied, the optional username and password fields will be used to connect to the DSN. If a connection string is supplied, the dsn, username, and password fields are ignored. The connection string will be passed directly to the ODBC driver, so you can include any parameters your ODBC driver supports.

使用 DSN 连接时,请将该connection_string属性留空或从文件中省略。使用连接字符串时,请将 `<driver>` dsn、` username<driver>` 和password`<driver>` 字段留空或从文件中省略。连接字符串必须以一个键开头,该键指示 ODBC 管理器应使用哪个驱动程序,并且可能包含其他取决于特定驱动程序的键。有关详细信息,请参阅 ODBC 驱动程序的文档。配置数据库连接时,您还可以参考connectionstrings.comDriver等网站 。

When using a DSN connection, leave the connection_string property blank or omit it from the file. When using a connection string, leave the dsn, username, and password fields blank or omit them from the file. Connection strings must start with a Driver key indicating to the ODBC manager which driver should be used, and may include other keys that depend on the specific driver. Check the documentation for your ODBC driver for details. You may also find a reference site like connectionstrings.com useful when configuring a database connection.

KiCad 不推荐或认可任何特定的 ODBC 驱动程序或数据库服务器,但经测试可与 Sqlite、MySQL、MariaDB 和 PostgreSQL 配合使用。

KiCad does not recommend or endorse any particular ODBC driver or database server, but has been tested to work with Sqlite, MySQL, MariaDB, and PostgreSQL.

\Windows 用户:在 JSON 转义字符串中包含 反斜杠字符 ( ) 时,必须使用第二个反斜杠进行转义。如果在连接字符串中包含文件路径,请确保使用双反斜杠 ( \\)。
Flatpak 用户:您需要将相应的 ODBC 驱动程序作为 Flatpak 扩展安装。您可以通过软件管理器(例如 GNOME 软件中心)中 KiCad 的“附加组件”部分进行安装,也可以通过命令行进行安装:运行flatpak install org.kicad.KiCad.ODBCDriver.sqliteodbc 以下命令以支持 SQLite、flatpak install org.kicad.KiCad.ODBCDriver.mariadb-connector-odbcMariaDB 或 MySQL,或flatpak install org.kicad.KiCad.ODBCDriver.psqlodbcPostgreSQL。
Flatpak 用户:由于 Flatpak 的沙盒机制,连接到本地计算机上运行的数据库服务器的一种可能方法是通过 TCP/IP。请确保您的数据库服务器允许 TCP/IP 连接,然后将所需的Port参数添加到连接字符串中。例如,添加 `--port` 参数Port=3306;指定 MySQL/MariaDB 的默认 TCP 端口,或者Server=localhost;Port=5432; 添加 `--port` 参数强制 PostgreSQL 使用 TCP 连接到本地服务器。只有在通过 `.` 覆盖主机文件系统权限的情况下,才能使用默认的 UNIX 域套接字连接 MySQL、MariaDB 或 PostgreSQL flatpak override
配置库

每个数据库库可以包含映射到单个数据库表的“子库”。 libraries配置文件中的条目包含一个对象列表,每个对象定义一个库。每个库必须存在以下设置:

Each database library can contain "sub-libraries" mapped to a single database table. The libraries entry in the configuration file contains a list of objects that each define a single library. The following settings must exist for each library:

name:此子库(表)的名称将显示在 KiCad 用户界面中,并作为前缀添加到从该子库创建的每个符号的名称中。此名称可以包含除正斜杠 ( /) 之外的任何有效符号名称字符,因为斜杠字符用作子库名称和符号名称之间的分隔符。如果此字段留空,则不会向此子库中的符号添加前缀。

name: The name of the sub-library (table) that will be shown in the KiCad UI and included as a prefix in each symbol name placed from this sub-library. This name can include any valid characters for a symbol name except for a forward slash (/) because the slash character is used as a separator between the sub-library name and the symbol name. If this field is left blank, no prefix will be added to symbols in this sub-library.

table数据库中的表名。

table: The name of the table in the database.

key:包含唯一键的列名,该键将用于标识表中的各个部分。

key: The column name containing a unique key that will be used to identify parts from the table.

symbols:包含 KiCad 符号引用的列名称。

symbols: The column name containing KiCad symbol references.

footprints:包含 KiCad 封装参考信息的列名称。

footprints: The column name containing KiCad footprint references.

fields字段定义列表。此处定义的每个字段都会在将符号放置在原理图上时添加到该符号中。如果源符号中已定义了名称匹配的字段,则数据库表中的值将覆盖源符号中定义的值。每个字段定义可以包含:

fields: A list of field definitions. Each field defined here will be added to the symbol when it is placed on the schematic. If a field with a matching name is already defined in the source symbol, the value from the database table will override whatever value was defined in the source symbol. Each field definition may contain:

column要映射到字段的数据库表列的名称。

column: The name of the database table column that should be mapped to a field.

name:要从数据库中填充的 KiCad 字段的名称。

name: The name of the KiCad field to populate from the database.

visible_on_add如果true指定此字段,则在添加符号时,该字段将在原理图中可见。如果未指定此设置,则默认值为false

visible_on_add: If true, this field will be visible in the schematic when a symbol is added. If this setting is not specified, it will default to false.

visible_in_chooser如果指定true此字段,则该字段将在符号选择器中显示为一列。如果未指定此设置,则默认值为false

visible_in_chooser: If true, this field will be shown in the Symbol Chooser as a column. If this setting is not specified, it will default to false.

show_name如果指定此项true,则原理图中除了字段值之外,还会显示字段名称。如果未指定此设置,则默认值为false

show_name: If true, the field’s name will be shown in addition to its value in the schematic. If this setting is not specified, it will default to false.

inherit_properties如果指定了true此设置,并且源符号中已存在具有给定字段名称的字段name,则只会从数据库更新该字段的内容,其他属性(例如visible_on_addshow_name字段值等)将保持源符号中的设置不变。如果给定字段名称在源符号中不存在,则忽略此设置。如果未指定此设置,则默认值为false

inherit_properties: If true, and a field with the given name already exists on the source symbol, only the field contents will be updated from the database, and the other properties (visible_on_add, show_name, etc) will be kept as they were set in the source symbol. If the given field name does not exist in the source symbol, this setting is ignored. If this setting is not specified, it will default to false.

properties:符号属性到数据库列的映射。所有属性均为可选;任何未在数据库库配置中指定的属性都将继承自源符号的值。支持以下属性:

properties: A map of symbol properties to database columns. All properties are optional; any that are not specified in the database library configuration will be inherited from the values set for the source symbol. The following properties are supported:

description:符号的描述属性。

description: The symbol’s Description property.

footprint_filters:预留用于未来扩展。

footprint_filters: Reserved for future expansion.

keywords:符号的关键字属性。

keywords: The symbol’s Keywords property.

exclude_from_bom:该符号的“从物料清单中排除”设置。此处指定的列必须为数值类型,并将被视为布尔值(0 表示否,1 表示是)。

exclude_from_bom: The symbol’s "Exclude from Bill of Materials" setting. The column named here must be a numeric type, and will be taken as a boolean (0 for false, 1 for true).

exclude_from_board:符号的“从PCB中排除”设置。此处指定的列必须为数值类型,并将被视为布尔值(0表示否,1表示是)。

exclude_from_board: The symbol’s "Exclude from PCB" setting. The column named here must be a numeric type, and will be taken as a boolean (0 for false, 1 for true).

exclude_from_sim:符号的“从模拟中排除”设置。此处指定的列必须为数值类型,并将被视为布尔值(0 表示 false,1 表示 true)。

exclude_from_sim: The symbol’s "Exclude from simulation" setting. The column named here must be a numeric type, and will be taken as a boolean (0 for false, 1 for true).

数据库列可以映射到自定义(用户定义)字段,或者映射到某些内置的 KiCad 字段,包括ValueDatasheet

Database columns may be mapped to custom (user-defined) fields, or to certain built-in KiCad fields, including Value and Datasheet.

KiCad 仅支持文本(字符串)字段。如果您映射包含数值 SQL 数据类型的数据库列,它将使用通用转换算法转换为字符串,该算法会将极大或极小的数字转换为科学计数法。用户无法微调此格式转换,因此,如果需要显式控制数字到字符串的转换,则应在数据库中使用新列或视图来进行转换。

使用数据库库

Using database libraries

创建配置文件并将其添加到符号库表后,即可使用符号选择器从数据库表中放置元件。从数据库库放置的元件可以使用“从库更新符号”功能进行更新,该功能会更新数据库中所有已更改的字段,并在源库中更改时更新底层符号。

After creating your configuration file and adding it to your symbol library table, you can place parts from the database tables using the Symbol Chooser. Parts placed from a database library can be updated using the Update Symbols from Library function, which will update any fields that were changed in the database as well as updating the underlying symbol if it was changed in the source library.

请注意,数据库表引用的任何源库也必须存在于符号库表中,数据库库才能正常工作。如果您只想将某个库用作数据库库的符号源,可以通过在“管理符号库”对话框中取消选中“可见”复选框,将其从符号选择器中隐藏。

Note that any source library referenced by a database table must also be present in the symbol library table for the database library to function. If you want to use a library only as a source of symbols for a database library, you can hide it from the Symbol Chooser by clearing the "Visible" checkbox in the Manage Symbol Libraries dialog.

HTTP库

HTTP Libraries

HTTP 库是一种 KiCad 符号库,它从外部数据源(例如 ERP 系统)获取零件数据。与标准 KiCad 库不同,HTTP 库不包含任何符号或封装定义。相反,它们引用其他 KiCad 库中的符号和封装。

HTTP libraries are a type of KiCad symbol library that sources data about parts for an external source such as an ERP system. They do not contain any symbol or footprint definitions as standard KiCad libraries do. Instead, they reference symbols and footprints found in other KiCad libraries.

HTTP 库是只读的,支持 REST 或类似 REST 的 API。

HTTP libraries are read only and support REST or REST-like APIs.

HTTP 库配置文件

HTTP Library Configuration Files

要创建 HTTP 库,必须创建一个配置文件,其中包含 KiCad 连接到提供库(API)并从中检索数据所需的必要信息。

To create an HTTP library, you must create a configuration file that contains the necessary information for KiCad to connect to the providing library (API) and to retrieve data from it.

将以下模板复制到一个新文件中,并使用.kicad_httplib.ts 文件扩展名保存。然后,您应该编辑此文件,并将root_urltoken值替换为您自己的值。保存后,使用“配置符号库”对话框将此文件添加到全局符号库表中,该对话框位于“首选项”→“管理符号库…”下。

Copy the template below into a new file and save it using the .kicad_httplib file extension. You should then edit this file and replace root_url and token values with your own. Once saved, add this file to your global symbol library table using the Configure Symbol Libraries dialog which can be found under Preferences→Manage Symbol Libraries…​.

用户可以选择配置两个超时设置。第一个timeout_parts_seconds设置决定零件信息的有效期限,第二个timeout_categories_seconds设置决定类别信息的有效期限。默认值分别为 60 秒和 600 秒,但如果预计任一设置下的数据将保持不变,用户可以选择更高的值。这将显著加快符号选择器的打开速度。需要注意的是,无论超时设置如何,KiCad 都会在首次​​启动时重新缓存数据。

Users have the option to configure two timeout settings. The timeout_parts_seconds setting dictates the validity duration of a part’s information, while the timeout_categories_seconds setting determines how long categories remain valid. The default values are set to 60 seconds and 600 seconds respectively, but if the data for either setting is anticipated to remain unchanged, users can opt for higher values. This will significantly speed up the opening of the symbol chooser. It’s important to note that KiCad will re-cache the data on the initial startup regardless of these timeout settings.

{
    "meta": {
        "version": 1.0
    },
    "name": "KiCad HTTP Library",
    "description": "A KiCad library sourced from a REST API",
    "source": {
        "type": "REST_API",
        "api_version": "v1",
        "root_url": "http://localhost:8000/kicad-api",
        "token": "usertokendatastring",
        "timeout_parts_seconds": 60,
        "timeout_categories_seconds": 600
    }
}
{
    "meta": {
        "version": 1.0
    },
    "name": "KiCad HTTP Library",
    "description": "A KiCad library sourced from a REST API",
    "source": {
        "type": "REST_API",
        "api_version": "v1",
        "root_url": "http://localhost:8000/kicad-api",
        "token": "usertokendatastring",
        "timeout_parts_seconds": 60,
        "timeout_categories_seconds": 600
    }
}

验证

Authentication

身份验证仅通过访问令牌进行。如果 HTTP 库由外部维护,用户需要请求管理员颁发有效的令牌。

Authentication is done via an Access Token only. Users need to ask their administrators to get a valid token issued if the HTTP library is maintained externally.

类别的缓存行为

Caching Behaviour for Categories

KiCad会在用户打开符号选择器对话框时缓存所有可用的类别。之后,服务器端对类别所做的任何更改,KiCad都不会检测到,直到用户重启程序。这种实现方式旨在节省带宽资源,因为它避免了KiCad在用户每次打开符号选择器对话框时都尝试从API获取数据。这种持续的数据获取,尤其是在带宽受限的情况下,会严重影响KiCad的性能。

KiCad caches all available Categories once when opening the Symbol Chooser Dialog. Subsequently, any alterations made to the categories on the server side will remain undetected by KiCad until the user performs a program restart. This implementation is intentionally designed to conserve bandwidth resources, as it prevents KiCad from attempting to retrieve data from the API every time the user opens the Symbol Chooser Dialog. Such continuous data fetching, especially under constrained bandwidth conditions, would severely impede KiCad’s performance.

服务器响应代码

Server Response Codes

如果 KiCad 收到 API 错误,它会向用户显示错误消息。有关 API 错误和服务器响应的更多信息,请参阅 dev-docs.kicad.org 上的“API 和绑定”部分。

If KiCad receives an API error, it will display an error message to the user. For more information about API errors and server responses, see the APIs and Bindings section at dev-docs.kicad.org.

自定义网表和物料清单格式

Custom Netlist and BOM Formats

KiCad 可以输出各种格式的网络表和物料清单,用户也可以根据需要定义新的格式。

KiCad can output netlists and BOMs in various formats, and users can define new formats if desired.

导出网表的过程在 网表导出部分中进行了描述。BOM 输出的过程在BOM 导出部分中进行了描述 。

The process of exporting a netlist is described in the netlist export section. BOM output is described in the BOM export section.

以下部分介绍如何为新的输出格式创建导出器。

The following section describes how to create an exporter for a new output format.

新增网表生成器

Adding new netlist generators

单击“添加生成器…”按钮,即可将新的网表生成器添加到“导出网表”对话框中。

New netlist generators are added to the Export Netlist dialog by clicking the Add Generator…​ button.

自定义网表生成器

新建生成器需要指定名称和命令。名称显示在标签页中,命令会在单击“导出网表”按钮时运行。

New generators require a name and a command. The name is shown in the tab label, and the command is run whenever the Export Netlist button is clicked.

生成网表时,KiCad 会创建一个包含原理图所有网表信息的中间 XML 文件。然后运行生成器命令,将中间网表转换为所需的网表格式。

When the netlist is generated, KiCad creates an intermediate XML file which contains all of the netlist information from the schematic. The generator command is then run in order to transform the intermediate netlist into the desired netlist format.

必须正确配置网表命令,以便网表生成脚本能够以中间网表文件作为输入,并输出所需的网表文件。具体的网表命令取决于所使用的生成脚本。命令 格式如下所述。

The netlist command must be set up properly so that the netlist generator script takes the intermediate netlist file as input and outputs the desired netlist file. The exact netlist command will depend on the generator script used. The command format is described below.

Python 和 XSLT 是创建自定义网表生成器的常用工具。

Python and XSLT are commonly used tools to create custom netlist generators.

添加新的物料清单生成器

Adding a new BOM generator

KiCad 还使用中间网表文件,通过 生成 BOM 工具生成 BOM 。

KiCad also uses the intermediate netlist file to generate BOMs with the Generate BOM tool.

物料清单对话框

点击按钮即可向 BOM 生成器脚本列表添加其他脚本加号图标。点击按钮即可删除脚本删除图标 。该编辑图标按钮会在文本编辑器中打开所选脚本。

Additional scripts can be added to the list of BOM generator scripts by clicking the button. Scripts can be removed by clicking the button. The button opens the selected script in a text editor.

用 Python 和 XSLT 编写的生成器脚本可以包含一个头部注释,用于描述生成器的功能和用法。该头部注释会显示在 BOM 对话框中,作为每个生成器的描述。头部注释必须包含字符串“生成器” @package。该字符串之后到注释末尾​​的所有内容都将用作生成器的描述。

Generator scripts written in Python and XSLT can contain a header comment that describes the generator’s functionality and usage. This header comment is displayed in the BOM dialog as the description for each generator. The header comment must contain the string @package. Everything following that string until the end of the comment is used as the description for the generator.

KiCad会在添加新的生成器脚本时自动填充命令行字段,但根据生成器脚本的具体情况,可能需要手动调整命令行。KiCad会尝试根据生成器脚本头部中的示例命令行自动确定输出文件的扩展名。

KiCad automatically fills the command line field when a new generator script is added, but the command line might need to be adjusted by hand depending on the generator script. KiCad attempts to automatically determine the output file extension from the example command line in the generator script’s header.

生成器命令行格式

Generator command line format

网络表或物料清单导出器的命令行定义了 KiCad 将运行的命令,用于生成选定的输出文件。

The command line for a netlist or BOM exporter defines the command that KiCad will run to generate the selected output file.

对于使用 的网表导出器xsltproc,示例如下:

For a netlist exporter using xsltproc, an example is:

xsltproc -o %O.net /usr/share/kicad/plugins/netlist_form_pads-pcb.asc.xsl %I

xsltproc -o %O.net /usr/share/kicad/plugins/netlist_form_pads-pcb.asc.xsl %I

对于使用 Python 的 BOM 导出器,示例如下:

For a BOM exporter using Python, an example is:

/usr/bin/python3 /usr/share/kicad/plugins/bom_csv_grouped_by_value.py "%I" "%O.csv"

/usr/bin/python3 /usr/share/kicad/plugins/bom_csv_grouped_by_value.py "%I" "%O.csv"

建议在命令行参数周围加上引号("),以防参数包含空格或其他特殊字符。

命令行中某些字符序列(例如 `\n`%I%O`\n`)具有特殊含义,因为 KiCad 会在执行命令之前将其替换为文件名或路径。

Some character sequences like %I and %O have a special meaning in the command line, because KiCad replaces them with a filename or path before executing the command.

范围 替换为…… 描述

%I

%I

<project path>/<project name>.xml

<project path>/<project name>.xml

中间网表文件的绝对路径和文件名,该文件是 BOM 或网表生成器插件的输入。

Absolute path and filename of the intermediate netlist file, which is the input to the BOM or netlist generator plugin

%O

%O

<project path>/<project name>

<project path>/<project name>

输出BOM或网表文件的绝对路径和文件名(不含文件扩展名)。序列号后可能需要指定适当的文件扩展名 %O

Absolute path and filename of the output BOM or netlist file (without file extension). An appropriate file extension may need to be specified after the %O sequence.

%B

%B

<project name>

<project name>

输出BOM或网表文件的基本文件名(不包含路径或文件扩展名)。序列号后可能需要指定适当的文件扩展名 %B

Base filename of the output BOM or netlist file (without path or file extension). An appropriate file extension may need to be specified after the %B sequence.

%P

%P

<project path>

<project path>

项目目录的绝对路径,不带尾部斜杠。

Absolute path of the project directory, without trailing slash.

中间网表文件

Intermediate Netlist File

导出 BOM 文件和网表时,KiCad 会创建一个中间网表文件,然后运行一个单独的工具,将中间网表后处理成所需的网表或 BOM 格式。

When exporting BOM files and netlists, KiCad creates an intermediate netlist file and then runs a separate tool which post-processes the intermediate netlist into the desired netlist or BOM format.

中间网表采用 XML 语法,包含大量设计数据。根据输出类型(物料清单或网表),最终输出文件中将包含完整中间网表文件的不同子集。

The intermediate netlist uses XML syntax. It contains a large amount of data about the design. Depending on the output (BOM or netlist), different subsets of the complete intermediate netlist file will be included in the final output file.

下面详细描述中间网表文件的结构 。

The structure of the intermediate netlist file is described in detail below.

由于从中间网表文件到输出网表或物料清单的转换是文本到文本的转换,因此可以使用 Python、XSLT 或任何其他能够以 XML 作为输入的工具来编写后处理过滤器。

Because the conversion from intermediate netlist file to output netlist or BOM is a text-to-text transformation, the post-processing filter can be written using Python, XSLT, or any other tool capable of taking XML as input.

不建议在新版网表或物料清单导出器中使用 XSLT;应改用 Python 或其他工具。从 KiCad 7 开始,XSLTxsltproc不再随 KiCad 一起安装,但可以单独安装。尽管如此,下面仍然提供了一些使用 XSLT 的网表导出器示例。

中间网表结构

Intermediate Netlist structure

此示例展示了网表文件格式。

This sample gives an idea of the netlist file format.

<?xml version="1.0" encoding="utf-8"?>
<export version="D">
  <design>
    <source>F:\kicad_aux\netlist_test\netlist_test.sch</source>
    <date>29/08/2010 21:07:51</date>
    <tool>eeschema (2010-08-28 BZR 2458)-unstable</tool>
  </design>
  <components>
    <comp ref="P1">
      <value>CONN_4</value>
      <libsource lib="conn" part="CONN_4"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamps>4C6E2141</tstamps>
    </comp>
    <comp ref="U2">
      <value>74LS74</value>
      <libsource lib="74xx" part="74LS74"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamps>4C6E20BA</tstamps>
    </comp>
    <comp ref="U1">
      <value>74LS04</value>
      <libsource lib="74xx" part="74LS04"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamps>4C6E20A6</tstamps>
    </comp>
    <comp ref="C1">
      <value>CP</value>
      <libsource lib="device" part="CP"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamps>4C6E2094</tstamps>
    <comp ref="R1">
      <value>R</value>
      <libsource lib="device" part="R"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamps>4C6E208A</tstamps>
    </comp>
  </components>
  <libparts/>
  <libraries/>
  <nets>
    <net code="1" name="GND">
      <node ref="U1" pin="7"/>
      <node ref="C1" pin="2"/>
      <node ref="U2" pin="7"/>
      <node ref="P1" pin="4"/>
    </net>
    <net code="2" name="VCC">
      <node ref="R1" pin="1"/>
      <node ref="U1" pin="14"/>
      <node ref="U2" pin="4"/>
      <node ref="U2" pin="1"/>
      <node ref="U2" pin="14"/>
      <node ref="P1" pin="1"/>
    </net>
    <net code="3" name="">
      <node ref="U2" pin="6"/>
    </net>
    <net code="4" name="">
      <node ref="U1" pin="2"/>
      <node ref="U2" pin="3"/>
    </net>
    <net code="5" name="/SIG_OUT">
      <node ref="P1" pin="2"/>
      <node ref="U2" pin="5"/>
      <node ref="U2" pin="2"/>
    </net>
    <net code="6" name="/CLOCK_IN">
      <node ref="R1" pin="2"/>
      <node ref="C1" pin="1"/>
      <node ref="U1" pin="1"/>
      <node ref="P1" pin="3"/>
    </net>
  </nets>
</export>
<?xml version="1.0" encoding="utf-8"?>
<export version="D">
  <design>
    <source>F:\kicad_aux\netlist_test\netlist_test.sch</source>
    <date>29/08/2010 21:07:51</date>
    <tool>eeschema (2010-08-28 BZR 2458)-unstable</tool>
  </design>
  <components>
    <comp ref="P1">
      <value>CONN_4</value>
      <libsource lib="conn" part="CONN_4"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamps>4C6E2141</tstamps>
    </comp>
    <comp ref="U2">
      <value>74LS74</value>
      <libsource lib="74xx" part="74LS74"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamps>4C6E20BA</tstamps>
    </comp>
    <comp ref="U1">
      <value>74LS04</value>
      <libsource lib="74xx" part="74LS04"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamps>4C6E20A6</tstamps>
    </comp>
    <comp ref="C1">
      <value>CP</value>
      <libsource lib="device" part="CP"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamps>4C6E2094</tstamps>
    <comp ref="R1">
      <value>R</value>
      <libsource lib="device" part="R"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamps>4C6E208A</tstamps>
    </comp>
  </components>
  <libparts/>
  <libraries/>
  <nets>
    <net code="1" name="GND">
      <node ref="U1" pin="7"/>
      <node ref="C1" pin="2"/>
      <node ref="U2" pin="7"/>
      <node ref="P1" pin="4"/>
    </net>
    <net code="2" name="VCC">
      <node ref="R1" pin="1"/>
      <node ref="U1" pin="14"/>
      <node ref="U2" pin="4"/>
      <node ref="U2" pin="1"/>
      <node ref="U2" pin="14"/>
      <node ref="P1" pin="1"/>
    </net>
    <net code="3" name="">
      <node ref="U2" pin="6"/>
    </net>
    <net code="4" name="">
      <node ref="U1" pin="2"/>
      <node ref="U2" pin="3"/>
    </net>
    <net code="5" name="/SIG_OUT">
      <node ref="P1" pin="2"/>
      <node ref="U2" pin="5"/>
      <node ref="U2" pin="2"/>
    </net>
    <net code="6" name="/CLOCK_IN">
      <node ref="R1" pin="2"/>
      <node ref="C1" pin="1"/>
      <node ref="U1" pin="1"/>
      <node ref="P1" pin="3"/>
    </net>
  </nets>
</export>
通用网表文件结构

中间网表分为五个部分。

The intermediate Netlist accounts for five sections.

  • 标题部分。

  • The header section.

  • 组件部分。

  • The components section.

  • 库部件部分。

  • The lib parts section.

  • 图书馆部分。

  • The libraries section.

  • 网具部分。

  • The nets section.

文件内容包含分隔符<export>

The file content has the delimiter <export>

<export version="D">
...
</export>
<export version="D">
...
</export>
标题部分

标题包含分隔符<design>

The header has the delimiter <design>

<design>
<source>F:\kicad_aux\netlist_test\netlist_test.sch</source>
<date>21/08/2010 08:12:08</date>
<tool>eeschema (2010-08-09 BZR 2439)-unstable</tool>
</design>
<design>
<source>F:\kicad_aux\netlist_test\netlist_test.sch</source>
<date>21/08/2010 08:12:08</date>
<tool>eeschema (2010-08-09 BZR 2439)-unstable</tool>
</design>

本部分可视为评论区。

This section can be considered a comment section.

组件部分

组件部分包含分隔符<components>

The component section has the delimiter <components>

<components>
<comp ref="P1">
<value>CONN_4</value>
<libsource lib="conn" part="CONN_4"/>
<sheetpath names="/" tstamps="/"/>
<tstamps>4C6E2141</tstamps>
</comp>
</components>
<components>
<comp ref="P1">
<value>CONN_4</value>
<libsource lib="conn" part="CONN_4"/>
<sheetpath names="/" tstamps="/"/>
<tstamps>4C6E2141</tstamps>
</comp>
</components>

本节包含原理图中所有元件的列表。每个元件的描述如下:

This section contains the list of components in your schematic. Each component is described like this:

<comp ref="P1">
<value>CONN_4</value>
<libsource lib="conn" part="CONN_4"/>
<sheetpath names="/" tstamps="/"/>
<tstamps>4C6E2141</tstamps>
</comp>
<comp ref="P1">
<value>CONN_4</value>
<libsource lib="conn" part="CONN_4"/>
<sheetpath names="/" tstamps="/"/>
<tstamps>4C6E2141</tstamps>
</comp>
元素名称 元素描述

libsource

libsource

该组件所在的库的名称。

name of the lib where this component was found.

part

part

此库中的组件名称。

component name inside this library.

sheetpath

sheetpath

图纸在层次​​结构中的路径:在完整的原理图层次结构中识别图纸。

path of the sheet inside the hierarchy: identify the sheet within the full schematic hierarchy.

tstamps

tstamps

组件的时间戳。

timestamp of the component.

关于组件时间戳的说明

为了在网表(进而在电路板上)中识别元件,通常使用时间戳作为每个元件的唯一标识。然而,KiCad 还提供了一种辅助方法来识别元件,即电路板上对应的封装。这允许在原理图项目中重新标注元件,而不会丢失元件与其封装之间的关联。

To identify a component in a netlist and therefore on a board, the timestamp reference is used as unique for each component. However KiCad provides an auxiliary way to identify a component which is the corresponding footprint on the board. This allows the re-annotation of components in a schematic project and does not lose the link between the component and its footprint.

时间戳是原理图项目中每个元件或图纸的唯一标识符。然而,在复杂的层级结构中,同一张图纸可能会被多次使用,因此该图纸上可能包含具有相同时间戳的元件。

A time stamp is an unique identifier for each component or sheet in a schematic project. However, in complex hierarchies, the same sheet is used more than once, so this sheet contains components having the same time stamp.

在复杂的层级结构中,每个工作表都有一个唯一的标识符:工作表路径。在复杂的层级结构中,每个组件都有一个唯一的标识符:工作表路径及其时间戳。

A given sheet inside a complex hierarchy has an unique identifier: its sheetpath. A given component (inside a complex hierarchy) has a unique identifier: the sheetpath and its timestamp.

libparts 部分

libparts 部分以分隔符分隔<libparts>,该部分的内容在原理图库中定义。

The libparts section has the delimiter <libparts>, and the content of this section is defined in the schematic libraries.

<libparts>
<libpart lib="device" part="CP">
  <description>Condensateur polarise</description>
  <footprints>
    <fp>CP*</fp>
    <fp>SM*</fp>
  </footprints>
  <fields>
    <field name="Reference">C</field>
    <field name="Valeur">CP</field>
  </fields>
  <pins>
    <pin num="1" name="1" type="passive"/>
    <pin num="2" name="2" type="passive"/>
  </pins>
</libpart>
</libparts>
<libparts>
<libpart lib="device" part="CP">
  <description>Condensateur polarise</description>
  <footprints>
    <fp>CP*</fp>
    <fp>SM*</fp>
  </footprints>
  <fields>
    <field name="Reference">C</field>
    <field name="Valeur">CP</field>
  </fields>
  <pins>
    <pin num="1" name="1" type="passive"/>
    <pin num="2" name="2" type="passive"/>
  </pins>
</libpart>
</libparts>
元素名称 元素描述

<footprints>

<footprints>

该符号的足迹过滤器。每个足迹过滤器都位于单独的<fp>标签中。

The symbol’s footprint filters. Each footprint filter is in a separate <fp> tag.

<fields>

<fields>

该符号的字段。每个字段的名称和值都在单独的 `<field name="fieldname">…​</field> 标签中给出。

The symbol’s fields. Each field’s name and value is given in a separate `<field name="fieldname">…​</field> tag.

<pins>

<pins>

该符号的引脚。每个引脚都用单独的标签表示<pin num="pinnum" type="pintype"/>。可能的引脚类型如下所述。

The symbol’s pins. Each pin is given in a separate <pin num="pinnum" type="pintype"/> tag. Possible pintypes are described below.

可能的电气引脚类型有:

Possible electrical pin types are:

针型 描述

输入

Input

常用输入引脚

Usual input pin

输出

Output

正常输出

Usual output

双向

Bidirectional

输入或输出

Input or Output

三州

Tri-state

总线输入/输出

Bus input/output

被动的

Passive

被动元件的常见末端

Usual ends of passive components

未指定

Unspecified

未知电气类型

Unknown electrical type

电源输入

Power input

组件的功率输入

Power input of a component

功率输出

Power output

功率输出类似于稳压器输出

Power output like a regulator output

开放式集电极

Open collector

模拟比较器中常见的开路集电极

Open collector often found in analog comparators

开路发射极

Open emitter

逻辑电路中偶尔会发现开放式发射器

Open emitter sometimes found in logic

未连接

Not connected

原理图中必须留空。

Must be left open in schematic

图书馆部分

库部分包含分隔符<libraries>。此部分列出了项目中使用的原理图库。

The libraries section has the delimiter <libraries>. This section contains the list of schematic libraries used in the project.

<libraries>
  <library logical="device">
    <uri>F:\kicad\share\library\device.lib</uri>
  </library>
  <library logical="conn">
    <uri>F:\kicad\share\library\conn.lib</uri>
  </library>
</libraries>
<libraries>
  <library logical="device">
    <uri>F:\kicad\share\library\device.lib</uri>
  </library>
  <library logical="conn">
    <uri>F:\kicad\share\library\conn.lib</uri>
  </library>
</libraries>
网状部分

网络部分以分隔符分隔<nets>。本部分通过列出所有网络以及连接到每个网络的引脚来描述原理图的连接性。

The nets section has the delimiter <nets>. This section describes the connectivity of the schematic by listing all nets and the pins connected to each net.

<nets>
  <net code="1" name="GND">
    <node ref="U1" pin="7"/>
    <node ref="C1" pin="2"/>
    <node ref="U2" pin="7"/>
    <node ref="P1" pin="4"/>
  </net>
  <net code="2" name="VCC">
    <node ref="R1" pin="1"/>
    <node ref="U1" pin="14"/>
    <node ref="U2" pin="4"/>
    <node ref="U2" pin="1"/>
    <node ref="U2" pin="14"/>
    <node ref="P1" pin="1"/>
  </net>
</nets>
<nets>
  <net code="1" name="GND">
    <node ref="U1" pin="7"/>
    <node ref="C1" pin="2"/>
    <node ref="U2" pin="7"/>
    <node ref="P1" pin="4"/>
  </net>
  <net code="2" name="VCC">
    <node ref="R1" pin="1"/>
    <node ref="U1" pin="14"/>
    <node ref="U2" pin="4"/>
    <node ref="U2" pin="1"/>
    <node ref="U2" pin="14"/>
    <node ref="P1" pin="1"/>
  </net>
</nets>

一个可能的网包含以下内容。

A possible net contains the following.

<net code="1" name="GND">
  <node ref="U1" pin="7"/>
  <node ref="C1" pin="2"/>
  <node ref="U2" pin="7"/>
  <node ref="P1" pin="4"/>
</net>
<net code="1" name="GND">
  <node ref="U1" pin="7"/>
  <node ref="C1" pin="2"/>
  <node ref="U2" pin="7"/>
  <node ref="P1" pin="4"/>
</net>
元素名称 元素描述

net code

net code

该网络的内部标识符

an internal identifier for this net

name

name

网络名称

the net name

node

node

连接到网络的符号(由 标识)的引脚pin(由 标识)ref

the pin (identified by pin) of a symbol (identified by ref) which is connected to the net

示例网表导出器

Example netlist exporters

下面列出了一些使用 XSLT 的网表导出器示例。

Some example netlist exporters using XSLT are included below.

XSLT 本身是一种 XML 语言,非常适合 XML 转换。 xsltproc程序可用于读取中间 XML 网表输入文件,应用样式表转换输入,并将结果保存到输出文件中。使用该程序xsltproc需要一个符合 XSLT 约定的样式表文件。整个转换过程由 KiCad 处理,只需配置一次即可xsltproc按特定方式运行。

XSLT itself is an XML language very suitable for XML transformations. The xsltproc program can be used to read the Intermediate XML netlist input file, apply a style-sheet to transform the input, and save the results in an output file. Use of xsltproc requires a style-sheet file using XSLT conventions. The full conversion process is handled by KiCad, after it is configured once to run xsltproc in a specific way.

描述 XSL 转换 (XSLT) 的文档可在此处获取:http://www.w3.org/TR/xslt

The document that describes XSL Transformations (XSLT) is available here: http://www.w3.org/TR/xslt

编写新的网表导出器时,请考虑使用 Python 或其他工具而不是 XSLT。
使用 XSLT 的 PADS 网表示例

以下示例展示了如何使用 . 创建 PADS 网表格式的导出器xlstproc

The following example shows how to create an exporter for the PADS netlist format using xlstproc.

PADS网表格式由两部分组成:

The PADS netlist format is comprised of two sections:

  • 足迹列表

  • A list of footprints

  • 列出所有网络及其连接的垫片。

  • A list of nets, together with the pads connected to each net.

下面是一个 XSL 样式表,它将中间网表文件转换为 PADS 网表格式。

Below is an XSL style-sheet which converts the intermediate netlist file to the PADS netlist format.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet to Eeschema Generic Netlist Format to PADS netlist format
    Copyright (C) 2010, SoftPLC Corporation.
    GPL v2.

    How to use:
        https://lists.launchpad.net/kicad-developers/msg05157.html
-->

<!DOCTYPE xsl:stylesheet [
  <!ENTITY nl  "&#xd;&#xa;"> <!--new line CR, LF -->
]>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>

<xsl:template match="/export">
    <xsl:text>*PADS-PCB*&nl;*PART*&nl;</xsl:text>
    <xsl:apply-templates select="components/comp"/>
    <xsl:text>&nl;*NET*&nl;</xsl:text>
    <xsl:apply-templates select="nets/net"/>
    <xsl:text>*END*&nl;</xsl:text>
</xsl:template>

<!-- for each component -->
<xsl:template match="comp">
    <xsl:text> </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text> </xsl:text>
    <xsl:choose>
        <xsl:when test = "footprint != '' ">
            <xsl:apply-templates select="footprint"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>unknown</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

<!-- for each net -->
<xsl:template match="net">
    <!-- nets are output only if there is more than one pin in net -->
    <xsl:if test="count(node)>1">
        <xsl:text>*SIGNAL* </xsl:text>
        <xsl:choose>
            <xsl:when test = "@name != '' ">
                <xsl:value-of select="@name"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:text>N-</xsl:text>
                <xsl:value-of select="@code"/>
            </xsl:otherwise>
        </xsl:choose>
        <xsl:text>&nl;</xsl:text>
        <xsl:apply-templates select="node"/>
    </xsl:if>
</xsl:template>

<!-- for each node -->
<xsl:template match="node">
    <xsl:text> </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text>.</xsl:text>
    <xsl:value-of select="@pin"/>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

</xsl:stylesheet>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet to Eeschema Generic Netlist Format to PADS netlist format
    Copyright (C) 2010, SoftPLC Corporation.
    GPL v2.

    How to use:
        https://lists.launchpad.net/kicad-developers/msg05157.html
-->

<!DOCTYPE xsl:stylesheet [
  <!ENTITY nl  "&#xd;&#xa;"> <!--new line CR, LF -->
]>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>

<xsl:template match="/export">
    <xsl:text>*PADS-PCB*&nl;*PART*&nl;</xsl:text>
    <xsl:apply-templates select="components/comp"/>
    <xsl:text>&nl;*NET*&nl;</xsl:text>
    <xsl:apply-templates select="nets/net"/>
    <xsl:text>*END*&nl;</xsl:text>
</xsl:template>

<!-- for each component -->
<xsl:template match="comp">
    <xsl:text> </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text> </xsl:text>
    <xsl:choose>
        <xsl:when test = "footprint != '' ">
            <xsl:apply-templates select="footprint"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>unknown</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

<!-- for each net -->
<xsl:template match="net">
    <!-- nets are output only if there is more than one pin in net -->
    <xsl:if test="count(node)>1">
        <xsl:text>*SIGNAL* </xsl:text>
        <xsl:choose>
            <xsl:when test = "@name != '' ">
                <xsl:value-of select="@name"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:text>N-</xsl:text>
                <xsl:value-of select="@code"/>
            </xsl:otherwise>
        </xsl:choose>
        <xsl:text>&nl;</xsl:text>
        <xsl:apply-templates select="node"/>
    </xsl:if>
</xsl:template>

<!-- for each node -->
<xsl:template match="node">
    <xsl:text> </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text>.</xsl:text>
    <xsl:value-of select="@pin"/>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

</xsl:stylesheet>

以下是运行后 PADS 生成的网表输出文件xsltproc

And here is the PADS netlist output file after running xsltproc:

*焊盘-PCB*
*部分*
P1未知
U2未知
U1 未知
C1未知
R1 未知
*网*
*信号* 接地
U1.7
C1.2
U2.7
P1.4
*信号* VCC
R1.1
U1.14
U2.4
U2.1
U2.14
P1.1
*信号* N-4
U1.2
U2.3
*信号* /SIG_OUT
P1.2
U2.5
U2.2
*信号* /时钟输入
R1.2
C1.1
U1.1
P1.3

*结尾*
*PADS-PCB*
*PART*
P1 unknown
U2 unknown
U1 unknown
C1 unknown
R1 unknown
*NET*
*SIGNAL* GND
U1.7
C1.2
U2.7
P1.4
*SIGNAL* VCC
R1.1
U1.14
U2.4
U2.1
U2.14
P1.1
*SIGNAL* N-4
U1.2
U2.3
*SIGNAL* /SIG_OUT
P1.2
U2.5
U2.2
*SIGNAL* /CLOCK_IN
R1.2
C1.1
U1.1
P1.3

*END*

执行此转换的命令行是:

The command line to make this conversion is:

kicad\\bin\\xsltproc.exe -o test.net kicad\\bin\\plugins\\netlist_form_pads-pcb.xsl test.tmp

kicad\\bin\\xsltproc.exe -o test.net kicad\\bin\\plugins\\netlist_form_pads-pcb.xsl test.tmp

使用 XSLT 的 Cadstar 网表示例

以下示例展示了如何使用 . 创建 Cadstar 网络表格式的导出器xlstproc

The following example shows how to create an exporter for the Cadstar netlist format using xlstproc.

Cadstar格式由两部分组成:

The Cadstar format is comprised of two sections:

  • 足迹列表

  • The footprint list

  • 网状结构列表:按网状结构分组垫片引用。

  • The Nets list: grouping pads references by nets

下面是一个 XSL 样式表,它将中间网表文件转换为 Cadstar 网表格式。

Below is an XSL style-sheet which converts the intermediate netlist file to the Cadstar netlist format.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet to Eeschema Generic Netlist Format to CADSTAR netlist format
    Copyright (C) 2010, Jean-Pierre Charras.
    Copyright (C) 2010, SoftPLC Corporation.
    GPL v2. -->

<!DOCTYPE xsl:stylesheet [
  <!ENTITY nl  "&#xd;&#xa;"> <!--new line CR, LF -->
]>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>

<!-- Netlist header -->
<xsl:template match="/export">
    <xsl:text>.HEA&nl;</xsl:text>
    <xsl:apply-templates select="design/date"/>  <!-- Generate line .TIM <time> -->
    <xsl:apply-templates select="design/tool"/>  <!-- Generate line .APP <eeschema version> -->
    <xsl:apply-templates select="components/comp"/>  <!-- Generate list of components -->
    <xsl:text>&nl;&nl;</xsl:text>
    <xsl:apply-templates select="nets/net"/>          <!-- Generate list of nets and connections -->
    <xsl:text>&nl;.END&nl;</xsl:text>
</xsl:template>

 <!-- Generate line .TIM 20/08/2010 10:45:33 -->
<xsl:template match="tool">
    <xsl:text>.APP "</xsl:text>
    <xsl:apply-templates/>
    <xsl:text>"&nl;</xsl:text>
</xsl:template>

 <!-- Generate line .APP "eeschema (2010-08-17 BZR 2450)-unstable" -->
<xsl:template match="date">
    <xsl:text>.TIM </xsl:text>
    <xsl:apply-templates/>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

<!-- for each component -->
<xsl:template match="comp">
    <xsl:text>.ADD_COM </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text> </xsl:text>
    <xsl:choose>
        <xsl:when test = "value != '' ">
            <xsl:text>"</xsl:text> <xsl:apply-templates select="value"/> <xsl:text>"</xsl:text>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>""</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

<!-- for each net -->
<xsl:template match="net">
    <!-- nets are output only if there is more than one pin in net -->
    <xsl:if test="count(node)>1">
    <xsl:variable name="netname">
        <xsl:text>"</xsl:text>
        <xsl:choose>
            <xsl:when test = "@name != '' ">
                <xsl:value-of select="@name"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:text>N-</xsl:text>
                <xsl:value-of select="@code"/>
        </xsl:otherwise>
        </xsl:choose>
        <xsl:text>"&nl;</xsl:text>
        </xsl:variable>
        <xsl:apply-templates select="node" mode="first"/>
        <xsl:value-of select="$netname"/>
        <xsl:apply-templates select="node" mode="others"/>
    </xsl:if>
</xsl:template>

<!-- for each node -->
<xsl:template match="node" mode="first">
    <xsl:if test="position()=1">
       <xsl:text>.ADD_TER </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text>.</xsl:text>
    <xsl:value-of select="@pin"/>
    <xsl:text> </xsl:text>
    </xsl:if>
</xsl:template>

<xsl:template match="node" mode="others">
    <xsl:choose>
        <xsl:when test='position()=1'>
        </xsl:when>
        <xsl:when test='position()=2'>
           <xsl:text>.TER     </xsl:text>
        </xsl:when>
        <xsl:otherwise>
           <xsl:text>         </xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:if test="position()>1">
        <xsl:value-of select="@ref"/>
        <xsl:text>.</xsl:text>
        <xsl:value-of select="@pin"/>
        <xsl:text>&nl;</xsl:text>
    </xsl:if>
</xsl:template>

</xsl:stylesheet>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet to Eeschema Generic Netlist Format to CADSTAR netlist format
    Copyright (C) 2010, Jean-Pierre Charras.
    Copyright (C) 2010, SoftPLC Corporation.
    GPL v2. -->

<!DOCTYPE xsl:stylesheet [
  <!ENTITY nl  "&#xd;&#xa;"> <!--new line CR, LF -->
]>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>

<!-- Netlist header -->
<xsl:template match="/export">
    <xsl:text>.HEA&nl;</xsl:text>
    <xsl:apply-templates select="design/date"/>  <!-- Generate line .TIM <time> -->
    <xsl:apply-templates select="design/tool"/>  <!-- Generate line .APP <eeschema version> -->
    <xsl:apply-templates select="components/comp"/>  <!-- Generate list of components -->
    <xsl:text>&nl;&nl;</xsl:text>
    <xsl:apply-templates select="nets/net"/>          <!-- Generate list of nets and connections -->
    <xsl:text>&nl;.END&nl;</xsl:text>
</xsl:template>

 <!-- Generate line .TIM 20/08/2010 10:45:33 -->
<xsl:template match="tool">
    <xsl:text>.APP "</xsl:text>
    <xsl:apply-templates/>
    <xsl:text>"&nl;</xsl:text>
</xsl:template>

 <!-- Generate line .APP "eeschema (2010-08-17 BZR 2450)-unstable" -->
<xsl:template match="date">
    <xsl:text>.TIM </xsl:text>
    <xsl:apply-templates/>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

<!-- for each component -->
<xsl:template match="comp">
    <xsl:text>.ADD_COM </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text> </xsl:text>
    <xsl:choose>
        <xsl:when test = "value != '' ">
            <xsl:text>"</xsl:text> <xsl:apply-templates select="value"/> <xsl:text>"</xsl:text>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>""</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

<!-- for each net -->
<xsl:template match="net">
    <!-- nets are output only if there is more than one pin in net -->
    <xsl:if test="count(node)>1">
    <xsl:variable name="netname">
        <xsl:text>"</xsl:text>
        <xsl:choose>
            <xsl:when test = "@name != '' ">
                <xsl:value-of select="@name"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:text>N-</xsl:text>
                <xsl:value-of select="@code"/>
        </xsl:otherwise>
        </xsl:choose>
        <xsl:text>"&nl;</xsl:text>
        </xsl:variable>
        <xsl:apply-templates select="node" mode="first"/>
        <xsl:value-of select="$netname"/>
        <xsl:apply-templates select="node" mode="others"/>
    </xsl:if>
</xsl:template>

<!-- for each node -->
<xsl:template match="node" mode="first">
    <xsl:if test="position()=1">
       <xsl:text>.ADD_TER </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text>.</xsl:text>
    <xsl:value-of select="@pin"/>
    <xsl:text> </xsl:text>
    </xsl:if>
</xsl:template>

<xsl:template match="node" mode="others">
    <xsl:choose>
        <xsl:when test='position()=1'>
        </xsl:when>
        <xsl:when test='position()=2'>
           <xsl:text>.TER     </xsl:text>
        </xsl:when>
        <xsl:otherwise>
           <xsl:text>         </xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:if test="position()>1">
        <xsl:value-of select="@ref"/>
        <xsl:text>.</xsl:text>
        <xsl:value-of select="@pin"/>
        <xsl:text>&nl;</xsl:text>
    </xsl:if>
</xsl:template>

</xsl:stylesheet>

这是 Cadstar 输出文件。

Here is the Cadstar output file.

.HEA
.TIM 2010年8月21日 08:12:08
.APP“eeschema (2010-08-09 BZR 2439)-不稳定”
.ADD_COM P1 "CONN_4"
.ADD_COM U2 "74LS74"
.ADD_COM U1 "74LS04"
.ADD_COM C1“CP”
.ADD_COM R1 "R"


.ADD_TER U1.7 "GND"
.TER C1.2
         U2.7
         P1.4
.ADD_TER R1.1 "VCC"
.TER U1.14
         U2.4
         U2.1
         U2.14
         P1.1
.ADD_TER U1.2“N-4”
.TER U2.3
.ADD_TER P1.2 "/SIG_OUT"
.TER U2.5
         U2.2
.ADD_TER R1.2 "/CLOCK_IN"
.TER C1.1
         U1.1
         P1.3

。结尾
.HEA
.TIM 21/08/2010 08:12:08
.APP "eeschema (2010-08-09 BZR 2439)-unstable"
.ADD_COM P1 "CONN_4"
.ADD_COM U2 "74LS74"
.ADD_COM U1 "74LS04"
.ADD_COM C1 "CP"
.ADD_COM R1 "R"


.ADD_TER U1.7 "GND"
.TER     C1.2
         U2.7
         P1.4
.ADD_TER R1.1 "VCC"
.TER     U1.14
         U2.4
         U2.1
         U2.14
         P1.1
.ADD_TER U1.2 "N-4"
.TER     U2.3
.ADD_TER P1.2 "/SIG_OUT"
.TER     U2.5
         U2.2
.ADD_TER R1.2 "/CLOCK_IN"
.TER     C1.1
         U1.1
         P1.3

.END
使用 XSLT 的 OrcadPCB2 网表示例

此格式仅包含一个部分,即封装列表。每个封装都包含其焊盘列表,并引用相应的网络。

This format has only one section which is the footprint list. Each footprint includes a list of its pads with reference to a net.

下面是一个 XSL 样式表,用于将中间网表文件转换为 Orcad 网表格式。

Below is an XSL style-sheet which converts the intermediate netlist file to the Orcad netlist format.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet to Eeschema Generic Netlist Format to CADSTAR netlist format
    Copyright (C) 2010, SoftPLC Corporation.
    GPL v2.

    How to use:
        https://lists.launchpad.net/kicad-developers/msg05157.html
-->

<!DOCTYPE xsl:stylesheet [
  <!ENTITY nl  "&#xd;&#xa;"> <!--new line CR, LF -->
]>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>

<!--
    Netlist header
    Creates the entire netlist
    (can be seen as equivalent to main function in C
-->
<xsl:template match="/export">
    <xsl:text>( { Eeschema Netlist Version 1.1  </xsl:text>
    <!-- Generate line .TIM <time> -->
<xsl:apply-templates select="design/date"/>
<!-- Generate line eeschema version ... -->
<xsl:apply-templates select="design/tool"/>
<xsl:text>}&nl;</xsl:text>

<!-- Generate the list of components -->
<xsl:apply-templates select="components/comp"/>  <!-- Generate list of components -->

<!-- end of file -->
<xsl:text>)&nl;*&nl;</xsl:text>
</xsl:template>

<!--
    Generate id in header like "eeschema (2010-08-17 BZR 2450)-unstable"
-->
<xsl:template match="tool">
    <xsl:apply-templates/>
</xsl:template>

<!--
    Generate date in header like "20/08/2010 10:45:33"
-->
<xsl:template match="date">
    <xsl:apply-templates/>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

<!--
    This template read each component
    (path = /export/components/comp)
    creates lines:
     ( 3EBF7DBD $noname U1 74LS125
      ... pin list ...
      )
    and calls "create_pin_list" template to build the pin list
-->
<xsl:template match="comp">
    <xsl:text> ( </xsl:text>
    <xsl:choose>
        <xsl:when test = "tstamp != '' ">
            <xsl:apply-templates select="tstamp"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>00000000</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text> </xsl:text>
    <xsl:choose>
        <xsl:when test = "footprint != '' ">
            <xsl:apply-templates select="footprint"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>$noname</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text> </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text> </xsl:text>
    <xsl:choose>
        <xsl:when test = "value != '' ">
            <xsl:apply-templates select="value"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>"~"</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text>&nl;</xsl:text>
    <xsl:call-template name="Search_pin_list" >
        <xsl:with-param name="cmplib_id" select="libsource/@part"/>
        <xsl:with-param name="cmp_ref" select="@ref"/>
    </xsl:call-template>
    <xsl:text> )&nl;</xsl:text>
</xsl:template>

<!--
    This template search for a given lib component description in list
    lib component descriptions are in /export/libparts,
    and each description start at ./libpart
    We search here for the list of pins of the given component
    This template has 2 parameters:
        "cmplib_id" (reference in libparts)
        "cmp_ref"   (schematic reference of the given component)
-->
<xsl:template name="Search_pin_list" >
    <xsl:param name="cmplib_id" select="0" />
    <xsl:param name="cmp_ref" select="0" />
        <xsl:for-each select="/export/libparts/libpart">
            <xsl:if test = "@part = $cmplib_id ">
                <xsl:apply-templates name="build_pin_list" select="pins/pin">
                    <xsl:with-param name="cmp_ref" select="$cmp_ref"/>
                </xsl:apply-templates>
            </xsl:if>
        </xsl:for-each>
</xsl:template>


<!--
    This template writes the pin list of a component
    from the pin list of the library description
    The pin list from library description is something like
          <pins>
            <pin num="1" type="passive"/>
            <pin num="2" type="passive"/>
          </pins>
    Output pin list is ( <pin num> <net name> )
    something like
            ( 1 VCC )
            ( 2 GND )
-->
<xsl:template name="build_pin_list" match="pin">
    <xsl:param name="cmp_ref" select="0" />

    <!-- write pin numner and separator -->
    <xsl:text>  ( </xsl:text>
    <xsl:value-of select="@num"/>
    <xsl:text> </xsl:text>

    <!-- search net name in nets section and write it: -->
    <xsl:variable name="pinNum" select="@num" />
    <xsl:for-each select="/export/nets/net">
        <!-- net name is output only if there is more than one pin in net
             else use "?" as net name, so count items in this net
        -->
        <xsl:variable name="pinCnt" select="count(node)" />
        <xsl:apply-templates name="Search_pin_netname" select="node">
            <xsl:with-param name="cmp_ref" select="$cmp_ref"/>
            <xsl:with-param name="pin_cnt_in_net" select="$pinCnt"/>
            <xsl:with-param name="pin_num"> <xsl:value-of select="$pinNum"/>
            </xsl:with-param>
        </xsl:apply-templates>
    </xsl:for-each>

    <!-- close line -->
    <xsl:text> )&nl;</xsl:text>
</xsl:template>

<!--
    This template writes the pin netname of a given pin of a given component
    from the nets list
    The nets list description is something like
      <nets>
        <net code="1" name="GND">
          <node ref="J1" pin="20"/>
              <node ref="C2" pin="2"/>
        </net>
        <net code="2" name="">
          <node ref="U2" pin="11"/>
        </net>
    </nets>
    This template has 2 parameters:
        "cmp_ref"   (schematic reference of the given component)
        "pin_num"   (pin number)
-->

<xsl:template name="Search_pin_netname" match="node">
    <xsl:param name="cmp_ref" select="0" />
    <xsl:param name="pin_num" select="0" />
    <xsl:param name="pin_cnt_in_net" select="0" />

    <xsl:if test = "@ref = $cmp_ref ">
        <xsl:if test = "@pin = $pin_num">
        <!-- net name is output only if there is more than one pin in net
             else use "?" as net name
        -->
            <xsl:if test = "$pin_cnt_in_net>1">
                <xsl:choose>
                    <!-- if a net has a name, use it,
                        else build a name from its net code
                    -->
                    <xsl:when test = "../@name != '' ">
                        <xsl:value-of select="../@name"/>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:text>$N-0</xsl:text><xsl:value-of select="../@code"/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:if>
            <xsl:if test = "$pin_cnt_in_net &lt;2">
                <xsl:text>?</xsl:text>
            </xsl:if>
        </xsl:if>
    </xsl:if>

</xsl:template>

</xsl:stylesheet>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet to Eeschema Generic Netlist Format to CADSTAR netlist format
    Copyright (C) 2010, SoftPLC Corporation.
    GPL v2.

    How to use:
        https://lists.launchpad.net/kicad-developers/msg05157.html
-->

<!DOCTYPE xsl:stylesheet [
  <!ENTITY nl  "&#xd;&#xa;"> <!--new line CR, LF -->
]>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>

<!--
    Netlist header
    Creates the entire netlist
    (can be seen as equivalent to main function in C
-->
<xsl:template match="/export">
    <xsl:text>( { Eeschema Netlist Version 1.1  </xsl:text>
    <!-- Generate line .TIM <time> -->
<xsl:apply-templates select="design/date"/>
<!-- Generate line eeschema version ... -->
<xsl:apply-templates select="design/tool"/>
<xsl:text>}&nl;</xsl:text>

<!-- Generate the list of components -->
<xsl:apply-templates select="components/comp"/>  <!-- Generate list of components -->

<!-- end of file -->
<xsl:text>)&nl;*&nl;</xsl:text>
</xsl:template>

<!--
    Generate id in header like "eeschema (2010-08-17 BZR 2450)-unstable"
-->
<xsl:template match="tool">
    <xsl:apply-templates/>
</xsl:template>

<!--
    Generate date in header like "20/08/2010 10:45:33"
-->
<xsl:template match="date">
    <xsl:apply-templates/>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

<!--
    This template read each component
    (path = /export/components/comp)
    creates lines:
     ( 3EBF7DBD $noname U1 74LS125
      ... pin list ...
      )
    and calls "create_pin_list" template to build the pin list
-->
<xsl:template match="comp">
    <xsl:text> ( </xsl:text>
    <xsl:choose>
        <xsl:when test = "tstamp != '' ">
            <xsl:apply-templates select="tstamp"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>00000000</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text> </xsl:text>
    <xsl:choose>
        <xsl:when test = "footprint != '' ">
            <xsl:apply-templates select="footprint"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>$noname</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text> </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text> </xsl:text>
    <xsl:choose>
        <xsl:when test = "value != '' ">
            <xsl:apply-templates select="value"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>"~"</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text>&nl;</xsl:text>
    <xsl:call-template name="Search_pin_list" >
        <xsl:with-param name="cmplib_id" select="libsource/@part"/>
        <xsl:with-param name="cmp_ref" select="@ref"/>
    </xsl:call-template>
    <xsl:text> )&nl;</xsl:text>
</xsl:template>

<!--
    This template search for a given lib component description in list
    lib component descriptions are in /export/libparts,
    and each description start at ./libpart
    We search here for the list of pins of the given component
    This template has 2 parameters:
        "cmplib_id" (reference in libparts)
        "cmp_ref"   (schematic reference of the given component)
-->
<xsl:template name="Search_pin_list" >
    <xsl:param name="cmplib_id" select="0" />
    <xsl:param name="cmp_ref" select="0" />
        <xsl:for-each select="/export/libparts/libpart">
            <xsl:if test = "@part = $cmplib_id ">
                <xsl:apply-templates name="build_pin_list" select="pins/pin">
                    <xsl:with-param name="cmp_ref" select="$cmp_ref"/>
                </xsl:apply-templates>
            </xsl:if>
        </xsl:for-each>
</xsl:template>


<!--
    This template writes the pin list of a component
    from the pin list of the library description
    The pin list from library description is something like
          <pins>
            <pin num="1" type="passive"/>
            <pin num="2" type="passive"/>
          </pins>
    Output pin list is ( <pin num> <net name> )
    something like
            ( 1 VCC )
            ( 2 GND )
-->
<xsl:template name="build_pin_list" match="pin">
    <xsl:param name="cmp_ref" select="0" />

    <!-- write pin numner and separator -->
    <xsl:text>  ( </xsl:text>
    <xsl:value-of select="@num"/>
    <xsl:text> </xsl:text>

    <!-- search net name in nets section and write it: -->
    <xsl:variable name="pinNum" select="@num" />
    <xsl:for-each select="/export/nets/net">
        <!-- net name is output only if there is more than one pin in net
             else use "?" as net name, so count items in this net
        -->
        <xsl:variable name="pinCnt" select="count(node)" />
        <xsl:apply-templates name="Search_pin_netname" select="node">
            <xsl:with-param name="cmp_ref" select="$cmp_ref"/>
            <xsl:with-param name="pin_cnt_in_net" select="$pinCnt"/>
            <xsl:with-param name="pin_num"> <xsl:value-of select="$pinNum"/>
            </xsl:with-param>
        </xsl:apply-templates>
    </xsl:for-each>

    <!-- close line -->
    <xsl:text> )&nl;</xsl:text>
</xsl:template>

<!--
    This template writes the pin netname of a given pin of a given component
    from the nets list
    The nets list description is something like
      <nets>
        <net code="1" name="GND">
          <node ref="J1" pin="20"/>
              <node ref="C2" pin="2"/>
        </net>
        <net code="2" name="">
          <node ref="U2" pin="11"/>
        </net>
    </nets>
    This template has 2 parameters:
        "cmp_ref"   (schematic reference of the given component)
        "pin_num"   (pin number)
-->

<xsl:template name="Search_pin_netname" match="node">
    <xsl:param name="cmp_ref" select="0" />
    <xsl:param name="pin_num" select="0" />
    <xsl:param name="pin_cnt_in_net" select="0" />

    <xsl:if test = "@ref = $cmp_ref ">
        <xsl:if test = "@pin = $pin_num">
        <!-- net name is output only if there is more than one pin in net
             else use "?" as net name
        -->
            <xsl:if test = "$pin_cnt_in_net>1">
                <xsl:choose>
                    <!-- if a net has a name, use it,
                        else build a name from its net code
                    -->
                    <xsl:when test = "../@name != '' ">
                        <xsl:value-of select="../@name"/>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:text>$N-0</xsl:text><xsl:value-of select="../@code"/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:if>
            <xsl:if test = "$pin_cnt_in_net &lt;2">
                <xsl:text>?</xsl:text>
            </xsl:if>
        </xsl:if>
    </xsl:if>

</xsl:template>

</xsl:stylesheet>

这是OrcadPCB2的输出文件。

Here is the OrcadPCB2 output file.

({ Eeschema Netlist 版本 1.1 2010年8月29日 21:07:51
eeschema (2010-08-28 BZR 2458)-不稳定}
 ( 4C6E2141 $noname P1 CONN_4
  (1 VCC)
  (2/SIG_OUT)
  (3/CLOCK_IN)
  (4 GND)
 )
 (4C6E20BA $noname U2 74LS74
  (1 VCC)
  (2/SIG_OUT)
  (3N-04)
  (4 VCC)
  (5/SIG_OUT)
  (6?)
  (7 GND)
  (14 VCC)
 )
 (4C6E20A6 $noname U1 74LS04
  (1/CLOCK_IN)
  (2 N-04)
  (7 GND)
  (14 VCC)
 )
 ( 4C6E2094 $noname C1 CP
  (1/CLOCK_IN)
  (2 GND)
 )
 (4C6E208A $noname R1 R
  (1 VCC)
  (2/CLOCK_IN)
 )
)
*
( { Eeschema Netlist Version 1.1  29/08/2010 21:07:51
eeschema (2010-08-28 BZR 2458)-unstable}
 ( 4C6E2141 $noname P1 CONN_4
  (  1 VCC )
  (  2 /SIG_OUT )
  (  3 /CLOCK_IN )
  (  4 GND )
 )
 ( 4C6E20BA $noname U2 74LS74
  (  1 VCC )
  (  2 /SIG_OUT )
  (  3 N-04 )
  (  4 VCC )
  (  5 /SIG_OUT )
  (  6 ? )
  (  7 GND )
  (  14 VCC )
 )
 ( 4C6E20A6 $noname U1 74LS04
  (  1 /CLOCK_IN )
  (  2 N-04 )
  (  7 GND )
  (  14 VCC )
 )
 ( 4C6E2094 $noname C1 CP
  (  1 /CLOCK_IN )
  (  2 GND )
 )
 ( 4C6E208A $noname R1 R
  (  1 VCC )
  (  2 /CLOCK_IN )
 )
)
*

操作参考

Actions reference

以下是 KiCad 原理图编辑器中所有可用操作的列表:可分配给热键的命令。

Below is a list of every available action in the KiCad Schematic Editor: a command that can be assigned to a hotkey.

原理图编辑器

Schematic Editor

以下操作可在原理图编辑器中使用。您可以在首选项的“快捷键”部分为这些操作分配快捷键。

The actions below are available in the Schematic Editor. Hotkeys can be assigned to any of these actions in the Hotkeys section of the preferences.

行动 默认热键 描述

将项目与网格对齐

Align Items to Grid

为原理图添加注释……

Annotate Schematic…​

填写原理图符号参考编号

Fill in schematic symbol reference designators

自动标注

Annotate Automatically

切换新符号的自动注释

Toggle automatic annotation of new symbols

分配足迹……

Assign Footprints…​

运行足迹分配工具

Run footprint assignment tool

清晰网状高光

Clear Net Highlighting

~

~

清除所有现有的网状高亮显示。

Clear any existing net highlighting

将图形导出到剪贴板

Export Drawing to Clipboard

将当前图纸导出到剪贴板

Export drawing of current sheet to clipboard

编辑库符号…

Edit Library Symbol…​

Ctrl+ Shift+E

Ctrl+Shift+E

在符号编辑器中打开库符号。

Open the library symbol in the Symbol Editor

编辑表格页码…

Edit Sheet Page Number…​

编辑当前或所选页面的页码

Edit the page number of the current or selected sheet

编辑符号字段…

Edit Symbol Fields…​

批量编辑原理图中所有符号的字段

Bulk-edit fields of all symbols in schematic

编辑符号库链接…

Edit Symbol Library Links…​

编辑原理图和库符号之间的链接

Edit links between schematic and library symbols

使用符号编辑器进行编辑

Edit with Symbol Editor

Ctrl+E

Ctrl+E

在符号编辑器中打开选定的符号。

Open the selected symbol in the Symbol Editor

导出网表…

Export Netlist…​

导出包含网表的文件,格式有多种可选。

Export file containing netlist in one of several formats

将符号导出到库…

Export Symbols to Library…​

将原理图中使用的符号添加到现有符号库中(不会从该库中删除其他符号)

Add symbols used in schematic to an existing symbol library (does not remove other symbols from this library)

将符号导出到新库…

Export Symbols to New Library…​

使用原理图中使用的符号创建一个新的符号库(如果库已存在,则会被替换)。

Create a new symbol library using the symbols used in the schematic (if the library already exists it will be replaced)

生成物料清单……

Generate Bill of Materials…​

根据当前原理图生成物料清单

Generate a bill of materials for the current schematic

生成物料清单(外部)…

Generate Bill of Materials (External)…​

使用外部生成器为当前原理图生成物料清单。

Generate a bill of materials for the current schematic using external generator

生成旧版物料清单…

Generate Legacy Bill of Materials…​

根据当前原理图生成物料清单(旧版生成器)

Generate a bill of materials for the current schematic (Legacy Generator)

高光网

Highlight Net

`

`

光标下的网状物被高亮显示

Highlight net under cursor

精彩集锦

Highlight Nets

突出显示网络上的电线和引脚

Highlight wires and pins of a net

导入足迹分配…

Import Footprint Assignments…​

从电路板编辑器创建的 .cmp 文件中导入符号封装分配

Import symbol footprint assignments from .cmp file created by board editor

导入图形…

Import Graphics…​

Ctrl+ Shift+F

Ctrl+Shift+F

导入二维绘图文件

Import 2D drawing file

从…开始增加注释

Increment Annotations From…​

从特定符号开始,递增一部分引用指示符。

Increment a subset of reference designators starting at a particular symbol

线路模式(适用于电线和总线)

Line Mode for Wires and Buses

将绘图和拖动限制为水平、垂直或 45 度角运动

Constrain drawing and dragging to horizontal, vertical, or 45-degree angle motions

线路模式(适用于电线和总线)

Line Mode for Wires and Buses

以任意角度绘制和拖动

Draw and drag at any angle

线路模式(适用于电线和总线)

Line Mode for Wires and Buses

Shift+Space

Shift+Space

切换到下一行模式

Switch to next line mode

线路模式(适用于电线和总线)

Line Mode for Wires and Buses

限制绘图和拖动操作只能进行水平或垂直运动。

Constrain drawing and dragging to horizontal or vertical motions

标记排除在模拟之外的项目

Mark items excluded from simulation

在已从模拟中排除的项目上画“X”。

Draw 'X’s over items which have been excluded from simulation

下一个符号单位

Next Symbol Unit

打开符号的下一个单元

Open the next unit of the symbol

前一个符号单位

Previous Symbol Unit

打开符号的前一个单元

Open the previous unit of the symbol

重新映射旧版库符号……

Remap Legacy Library Symbols…​

将旧式原理图中的库符号引用重新映射到符号库表

Remap library symbol references in legacy schematics to the symbol library table

维修示意图

Repair Schematic

运行各种诊断程序并尝试修复原理图

Run various diagnostics and attempt to repair schematic

救援标志……

Rescue Symbols…​

在项目中查找旧符号并重命名/恢复它们

Find old symbols in project and rename/rescue them

将当前工作表副本另存为…

Save Current Sheet Copy As…​

将当前工作表的副本保存到其他位置或名称

Save a copy of the current sheet to another location or name

原理图设置……

Schematic Setup…​

编辑原理图设置,包括注释样式和电气规则

Edit schematic setup including annotation styles and electrical rules

在PCB上进行选择

Select on PCB

在PCB编辑器中选择相应的项目

Select corresponding items in PCB editor

不要填充。

Do not Populate

设置不填充属性

Set the do not populate attribute

从物料清单中排除

Exclude from Bill of Materials

设置从物料清单属性中排除

Set the exclude from bill of materials attribute

排除在董事会之外

Exclude from Board

设置从看板属性中排除

Set the exclude from board attribute

从模拟中排除

Exclude from Simulation

设置从模拟属性中排除

Set the exclude from simulation attribute

显示指令标签

Show Directive Labels

显示 ERC 错误

Show ERC Errors

显示电气规则检查器错误的标记

Show markers for electrical rules checker errors

显示 ERC 排除项

Show ERC Exclusions

显示已排除的电气规则检查违规标记

Show markers for excluded electrical rules checker violations

显示 ERC 警告

Show ERC Warnings

显示电气规则检查器警告标记

Show markers for electrical rules checker warnings

显示隐藏字段

Show Hidden Fields

显示隐藏的图钉

Show Hidden Pins

网络导航器

Net Navigator

显示/隐藏网络导航器

Show/hide the net navigator

显示 OP 电流

Show OP Currents

显示仿真得到的运行点电流数据

Show operating point current data from simulation

显示运算电压

Show OP Voltages

显示仿真得到的运行点电压数据

Show operating point voltage data from simulation

切换到PCB编辑器

Switch to PCB Editor

在电路板编辑器中打开PCB

Open PCB in board editor

模拟器

Simulator

显示用于运行 SPICE 或 IBIS 仿真的仿真窗口。

Show simulation window for running SPICE or IBIS simulations.

显示别针备用图标

Show Pin Alternate Icons

显示具有备用模式的引脚的指示图标

Show indicator icons for pins with alternate modes

层级导航器

Hierarchy Navigator

Ctrl+H

Ctrl+H

显示/隐藏原理图图纸层级导航器

Show/hide the schematic sheet hierarchy navigator

符号检查器

Symbol Checker

显示符号检查器窗口

Show the symbol checker window

将符号与库进行比较

Compare Symbol with Library

展示原理图符号与其库等效符号之间的差异

Show differences between schematic symbol and its library equivalent

电气规则检查器

Electrical Rules Checker

显示电气规则检查器窗口

Show the electrical rules checker window

显示总线语法帮助

Show Bus Syntax Help

递减主要

Decrement Primary

减去所选项目的主要字段值

Decrement the primary field of the selected item(s)

次要递减

Decrement Secondary

减去所选项目的辅助字段值

Decrement the secondary field of the selected item(s)

增量

Increment

将选定的项目数量加一

Increment the selected item(s)

增量主

Increment Primary

将所选项目的主字段值加一。

Increment the primary field of the selected item(s)

增量二级

Increment Secondary

将所选项目的辅助字段值加一。

Increment the secondary field of the selected item(s)

结束大纲

Close Outline

关闭正在进行中的大纲

Close the in-progress outline

删除最后一个点

Delete Last Point

删除添加到当前项的最后一个点

Delete the last point added to the current item

画弧线

Draw Arcs

绘制贝塞尔曲线

Draw Bezier Curve

画圆

Draw Circles

绘制矩形

Draw Rectangles

绘制规则区域

Draw Rule Areas

绘制层级结构图

Draw Hierarchical Sheets

S

S

根据设计图绘制图纸

Draw Sheet from Design Block

将设计块作为工作表复制到当前工作表上的项目中

Copy design block into project as a sheet on current sheet

从文件中绘制图纸

Draw Sheet from File

将图纸复制到项目中,并在当前图纸上绘制。

Copy sheet into project and draw on current sheet

抽签表

Draw Tables

绘制文本框

Draw Text Boxes

导入表

Import Sheet

将表格导入项目

Import sheet into project

将电线放置到总线入口

Place Wire to Bus Entries

Z

Z

地点指示标签

Place Directive Labels

场地设计模块

Place Design Block

Shift+B

Shift+B

将选定的设计块添加到当前图纸

Add selected design block to current sheet

放置全局标签

Place Global Labels

Ctrl+L

Ctrl+L

放置层级标签

Place Hierarchical Labels

H

H

地点图像

Place Images

地点交汇处

Place Junctions

J

J

放置网状标签

Place Net Labels

L

L

下一个符号单位

Place Next Symbol Unit

将原理图中缺失的下一个当前符号单元放置在示意图中。

Place the next unit of the current symbol that is missing from the schematic

放置无连接标志

Place No Connect Flags

Q

Q

权力象征

Place Power Symbols

P

P

绘制文本

Draw Text

T

T

放置图钉

Place Sheet Pins

地名符号

Place Symbols

A

A

同步片图钉

Sync Sheet Pins

同步图纸图钉和层级标签

Synchronize sheet pins and hierarchical labels

同步片图钉

Sync Sheet Pins

同步图纸图钉和层级标签

Synchronize sheet pins and hierarchical labels

公交车

Draw Buses

B

B

画线

Draw Lines

I

I

拉线

Draw Wires

W

W

切换段姿态

Switch Segment Posture

/

/

切换当前段的姿态。

Switches posture of the current segment.

撤销上一段操作

Undo Last Segment

Back

Back

将当前线路向后移动一个线段。

Walks the current line back one segment.

从巴士上展开

Unfold from Bus

C

C

从公交车上扯下一根电线

Break a wire out of a bus

分配网络类…

Assign Netclass…​

为符合特定模式的网络分配网络类别

Assign a netclass to nets matching a pattern

自动放置字段

Autoplace Fields

O

O

对符号(或图纸)的字段运行自动放置算法

Runs the automatic placement algorithm on the symbol’s (or sheet’s) fields

休息

Break

分成若干相连的部分

Divide into connected segments

更改符号…

Change Symbol…​

从库中指定一个不同的符号。

Assign a different symbol from the library

更改符号……

Change Symbols…​

从库中分配不同的符号。

Assign different symbols from the library

清洁表别针

Cleanup Sheet Pins

删除未引用的图纸图钉

Delete unreferenced sheet pins

编辑足迹…

Edit Footprint…

F

F

编辑参考标识符…

Edit Reference Designator…​

U

U

编辑文本和图形属性…

Edit Text & Graphics Properties…​

全局编辑原理图中的文本和图形属性

Edit text and graphics properties globally across schematic

编辑数值…

Edit Value…

V

V

水平镜像

Mirror Horizontally

X

X

将选定的项目从左翻转到右

Flips selected item(s) from left to right

垂直镜像

Mirror Vertically

Y

Y

将选定的项目从上翻转到下

Flips selected item(s) from top to bottom

球桌…

Pin Table…​

显示引脚表,以便批量编辑引脚。

Displays pin table for bulk editing of pins

特性…

Properties…

E

E

重复上一项

Repeat Last Item

Ins

Ins

复制最后绘制的物品

Duplicates the last drawn item

逆时针旋转

Rotate Counterclockwise

R

R

顺时针旋转

Rotate Clockwise

德摩根备选方案

De Morgan Alternate

切换到另一种德摩根表示法

Switch to alternate De Morgan representation

德摩根标准

De Morgan Standard

切换到标准德摩根表示法

Switch to standard De Morgan representation

Slice

分成若干互不相连的部分

Divide into unconnected segments

交换

Swap

Alt+S

Alt+S

交换所选项目的位置

Swap positions of selected items

符号属性…

Symbol Properties…​

指令标签变更

Change to Directive Label

将现有项目更改为指令标签

Change existing item to a directive label

更改为全球标签

Change to Global Label

将现有项目更改为全局标签

Change existing item to a global label

更改为层级标签

Change to Hierarchical Label

将现有项目更改为层级标签

Change existing item to a hierarchical label

更改为标签

Change to Label

将现有项目更改为标签

Change existing item to a label

改为文本

Change to Text

将现有项目更改为文本注释

Change existing item to a text comment

改为文本框

Change to Text Box

将现有项目更改为文本框

Change existing item to a text box

德摩根转换

De Morgan Conversion

切换德摩根表示法

Switch between De Morgan representations

更新符号…

Update Symbol…​

更新符号以包含库中的任何更改

Update symbol to include any changes from the library

从库中更新符号……

Update Symbols from Library…​

更新符号以包含库中的任何更改

Update symbols to include any changes from the library

Drag

G

G

在保持连接的情况下移动物品

Move items while keeping their connections

移动

Move

M

M

选择连接

Select Connection

Ctrl+4

Ctrl+4

选择完整连接

Select a complete connection

选择节点

Select Node

Alt+3

Alt+3

选择光标下的连接项。

Select a connection item under the cursor

返回

Navigate Back

Alt+Left

Alt+Left

在工作表导航历史记录中向后移动

Move backward in sheet navigation history

变更表

Change Sheet

在原理图编辑器中更改所提供图纸的内容。

Change to provided sheet’s contents in the schematic editor

输入表格

Enter Sheet

在原理图编辑器中显示所选图纸的内容

Display the selected sheet’s contents in the schematic editor

向前导航

Navigate Forward

Alt+Right

Alt+Right

在表格导航历史记录中前进

Move forward in sheet navigation history

留出纸

Leave Sheet

Alt+Back

Alt+Back

在原理图编辑器中显示父图纸

Display the parent sheet in the schematic editor

下一页

Next Sheet

PgDn

PgDn

按编号移至下一张工作表

Move to next sheet by number

上一页

Previous Sheet

PgUp

PgUp

按编号移动到上一张工作表

Move to previous sheet by number

向上导航

Navigate Up

Alt+Up

Alt+Up

在层级结构中向上导航上一级。

Navigate up one sheet in the hierarchy

推针长度

Push Pin Length

将引脚长度复制到符号中的其他引脚

Copy pin length to other pins in symbol

图钉名称 尺寸

Push Pin Name Size

将引脚名称大小复制到符号中的其他引脚

Copy pin name size to other pins in symbol

图钉编号尺寸

Push Pin Number Size

将引脚编号大小复制到符号中的其他引脚

Copy pin number size to other pins in symbol

创建角落

Create Corner

移除角落

Remove Corner

特性…

Properties…

编辑设计块的属性

Edit properies of design block

删除设计块

Delete Design Block

从库中移除选定的设计块

Remove the selected design block from its library

将所选内容另存为设计块…

Save Selection as Design Block…​

从当前选区创建新的设计块

Create a new design block from the current selection

将当前工作表另存为设计块…

Save Current Sheet as Design Block…​

从当前图纸创建一个新的设计块

Create a new design block from the current sheet

设计模块

Design Blocks

显示/隐藏设计块库

Show/hide design blocks library

用户自定义信号……

User-defined Signals…​

添加、编辑或删除用户自定义仿真信号

Add, edit or delete user-defined simulation signals

新增分析标签页……

New Analysis Tab…​

Ctrl+N

Ctrl+N

创建包含仿真分析的新标签页

Create a new tab containing a simulation analysis

打开工作簿……

Open Workbook…​

Ctrl+O

Ctrl+O

打开已保存的分析标签页和设置集

Open a saved set of analysis tabs and settings

探针示意图……

Probe Schematic…​

P

P

添加模拟器探针

Add a simulator probe

运行模拟

Run Simulation

R

R

保存工作簿

Save Workbook

Ctrl+S

Ctrl+S

保存当前分析标签页和设置

Save the current set of analysis tabs and settings

将工作簿另存为…

Save Workbook As…​

Ctrl+ Shift+S

Ctrl+Shift+S

将当前分析选项卡和设置保存到其他位置

Save the current set of analysis tabs and settings to another location

显示 SPICE 网表

Show SPICE Netlist

编辑分析标签页…

Edit Analysis Tab…​

编辑当前分析选项卡的 SPICE 命令和绘图设置

Edit the current analysis tab’s SPICE command and plot setup

停止模拟

Stop Simulation

增加调谐价值……

Add Tuned Value…​

T

T

选择要调整的值

Select a value to be tuned

将当前图表导出为 CSV 文件…

Export Current Plot as CSV…​

将当前图表导出为 PNG 格式…

Export Current Plot as PNG…​

将电流图导出为原理图

Export Current Plot to Schematic

将当前图表导出到剪贴板

Export Current Plot to Clipboard

深色模式图表

Dark Mode Plots

绘制黑色背景的图表

Draw plots with a black background

虚线电流/相位

Dotted Current/Phase

用虚线绘制次级信号轨迹(电流或相位)。

Draw secondary signal trace (current or phase) with a dotted line

传奇人物

Show Legend

画线

Draw Lines

绘制连接的图形线条

Draw connected graphic lines

绘制多边形

Draw Polygons

绘制文本框

Draw Text Boxes

移动符号锚点

Move Symbol Anchor

图钉

Draw Pins

P

P

绘制文本

Draw Text

向原理图添加符号

Add Symbol to Schematic

将电流符号添加到原理图中。

Add the current symbol to the schematic

复制

Copy

Cut

删除符号

Delete Symbol

从其库中移除选定的符号。

Remove the selected symbol from its library

从现有符号派生……

Derive from Existing Symbol…​

创建一个新的符号,该符号派生自现有符号。

Create a new symbol, derived from an existing symbol

重复符号

Duplicate Symbol

编辑符号

Edit Symbol

在编辑器画布上显示选定的符号

Show selected symbol on editor canvas

将符号导出为 SVG…

Export Symbol as SVG…

从当前符号创建 SVG 文件

Create SVG file from the current symbol

导出视图为 PNG 格式…

Export View as PNG…

从当前视图创建 PNG 文件

Create PNG file from the current view

导入符号…

Import Symbol…​

将符号导入当前库

Import a symbol to the current library

新符号……

New Symbol…​

Ctrl+N

Ctrl+N

在现有库中创建新符号

Create a new symbol in an existing library

粘贴符号

Paste Symbol

重命名符号…

Rename Symbol…​

将库另存为…

Save Library As…​

Ctrl+ Shift+S

Ctrl+Shift+S

将当前库保存到新文件

Save the current library to a new file

另存为…

Save As…

将当前符号保存到其他库或名称中

Save the current symbol to a different library or name

另存为…

Save Copy As…​

将当前符号的副本保存到不同的库或名称中

Save a copy of the current symbol to a different library or name

设置单位显示名称…

Set Unit Display Name…​

设置多单元符号中特定单元的显示名称

Set the display name for a particular unit in a multi-unit symbol

显示引脚电气类型

Show Pin Electrical Types

标注引脚的电气类型

Annotate pins with their electrical types

显示隐藏字段

Show Hidden Fields

显示隐藏的图钉

Show Hidden Pins

显示密码

Show Pin Numbers

在别针上标注编号

Annotate pins with their numbers

同步引脚模式

Synchronized Pins Mode

同步引脚模式:启用后,所有更改(引脚编号除外)都会同步到其他单元。对于具有可互换单元的多单元部件,默认启用此功能。

Synchronized Pins Mode When enabled propagates all changes (except pin numbers) to other units. Enabled by default for multiunit parts with interchangeable units.

更新符号字段…

Update Symbol Fields…​

更新符号以匹配父符号所做的更改

Update symbol to match changes made in parent symbol

常见的

Common

以下操作可在 KiCad 的各个界面中使用,包括原理图编辑器。您可以在首选项的“快捷键”部分为这些操作分配快捷键。

The actions below are available across KiCad, including in the Schematic Editor. Hotkeys can be assigned to any of these actions in the Hotkeys section of the preferences.

行动 默认热键 描述

刷新插件

Refresh Plugins

重新加载所有Python插件并刷新插件菜单

Reload all python plugins and refresh plugin menus

排除标记

Exclude Marker

在检查器窗口中将当前违规行为标记为排除项

Mark current violation in Checker window as an exclusion

下一个标记

Next Marker

上一个标记

Previous Marker

添加图书馆…

Add Library…

添加现有库文件夹

Add an existing library folder

居中对齐

Center Justify

居中对齐字段和文本项

Center-justify fields and text items

平移至选定对象中心

Pan to Center Selected Objects

全部收起

Collapse All

点击

Click

Return

Return

执行鼠标左键单击

Performs left mouse button click

双击

Double-click

End

End

执行鼠标左键双击

Performs left mouse button double-click

光标向下

Cursor Down

Down

Down

快速向下移动光标

Cursor Down Fast

Ctrl+Down

Ctrl+Down

光标向左

Cursor Left

Left

Left

快速向左移动光标

Cursor Left Fast

Ctrl+Left

Ctrl+Left

光标向右

Cursor Right

Right

Right

快速向右移动光标

Cursor Right Fast

Ctrl+Right

Ctrl+Right

光标向上

Cursor Up

Up

Up

快速向上移动光标

Cursor Up Fast

Ctrl+Up

Ctrl+Up

网格原点…

Grid Origin…​

设置网格原点

Set the grid origin point

编辑网格…

Edit Grids…​

编辑网格定义

Edit grid definitions

全部展开

Expand All

切换到快速网格 1

Switch to Fast Grid 1

Alt+1

Alt+1

切换到快速网格 2

Switch to Fast Grid 2

Alt+2

Alt+2

循环快速电网

Cycle Fast Grid

Alt+4

Alt+4

切换到下一个网格

Switch to Next Grid

N

N

切换到上一网格

Switch to Previous Grid

Shift+N

Shift+N

重置网格原点

Reset Grid Origin

网格原点

Grid Origin

放置网格原点

Place the grid origin point

隐藏库树

Hide Library Tree

非活动图层视图模式

Inactive Layer View Mode

切换非活动图层的正常和暗淡状态

Toggle inactive layers between normal and dimmed

非活动图层视图模式(3 状态)

Inactive Layer View Mode (3-state)

H

H

循环切换非活动图层,在正常、暗淡和隐藏状态之间切换。

Cycle inactive layers between normal, dimmed, and hidden

英寸

Inches

左对齐

Left Justify

左对齐字段和文本项

Left-justify fields and text items

焦点库树搜索字段

Focus Library Tree Search Field

Ctrl+L

Ctrl+L

仅捕捉到活动图层上的对象

Snap to Objects on the Active Layer Only

仅启用捕捉到活动图层上的对象

Enables snapping to objects on the active layer only

捕捉到所有图层上的对象

Snap to Objects on All Layers

启用捕捉到所有可见图层上的对象

Enables snapping to objects on all visible layers

在活动图层和所有图层之间切换对齐方式

Toggle Snapping Between Active and All Layers

Shift+S

Shift+S

切换吸附在所有可见图层和仅吸附在活动区域​​之间的状态

Toggles between snapping on all visible layers and only the active area

毫米

Millimeters

米尔斯

Mils

新的…

New…​

Ctrl+N

Ctrl+N

在编辑器中创建一个新文档

Create a new document in the editor

新图书馆……

New Library…

创建一个新的库文件夹

Create a new library folder

打开…

Open…​

Ctrl+O

Ctrl+O

打开现有文档

Open existing document

在文件资源管理器中打开…

Open in file explorer…​

使用系统文件资源管理器打开库文件

Open a library file with system file explorer

在文本编辑器中编辑……

Edit in a Text Editor…​

用文本编辑器打开库文件

Open a library file with a text editor

页面设置…

Page Settings…​

纸张尺寸和标题栏信息设置

Settings for paper size and title block info

向下摇摄

Pan Down

Shift+Down

Shift+Down

向左平移

Pan Left

Shift+Left

Shift+Left

向右平移

Pan Right

Shift+Right

Shift+Right

向上摇摄

Pan Up

Shift+Up

Shift+Up

引脚库

Pin Library

把图书馆放在首位

Keep the library at the top of the list

剧情……

Plot…​

打印…

Print…​

Ctrl+P

Ctrl+P

辞职

Quit

关闭当前编辑器

Close the current editor

重做上次缩放

Redo Last Zoom

返回上次缩放之前的缩放级别 撤销

Return zoom to level prior to last zoom undo

重置本地坐标

Reset Local Coordinates

Space

Space

恢复

Revert

丢弃零钱

Throw away changes

右对齐

Right Justify

右对齐字段和文本项

Right-justify fields and text items

节省

Save

Ctrl+S

Ctrl+S

保存更改

Save changes

全部保存

Save All

保存所有更改

Save all changes

另存为…

Save As…

Ctrl+ Shift+S

Ctrl+Shift+S

将当前文档保存到其他位置

Save current document to another location

保存副本…

Save a Copy…​

将当前文档的副本保存到其他位置

Save a copy of the current document to another location

选择列…

Select Columns…​

3D 查看器

3D Viewer

Alt+3

Alt+3

显示 3D 查看器窗口

Show 3D viewer window

显示上下文菜单

Show Context Menu

执行鼠标右键操作

Perform the right-mouse-button action

显示数据表

Show Datasheet

D

D

在浏览器中打开数据表

Open the datasheet in a browser

足迹库浏览器

Footprint Library Browser

足迹编辑器

Footprint Editor

创建、删除和编辑电路板封装

Create, delete and edit board footprints

图书馆树

Library Tree

切换到项目经理

Switch to Project Manager

显示项目窗口

Show project window

特性

Properties

显示/隐藏属性管理器

Show/hide the properties manager

符号库浏览器

Symbol Library Browser

符号编辑器

Symbol Editor

创建、删除和编辑原理图符号

Create, delete and edit schematic symbols

绘制边界框

Draw Bounding Boxes

始终显示十字准星

Always Show Crosshairs

Ctrl+ Shift+X

Ctrl+Shift+X

即使不绘制对象,也显示十字准星

Display crosshairs even when not drawing objects

全窗口十字准星

Full-Window Crosshairs

切换显示全窗口十字准星

Switch display of full-window crosshairs

显示网格

Show Grid

在编辑窗口中显示背景网格

Display background grid in the edit window

网格覆盖

Grid Overrides

Ctrl+ Shift+G

Ctrl+Shift+G

启用可覆盖当前网格的商品特定网格

Enables item-specific grids that override the current grid

极坐标

Polar Coordinates

在极坐标系和笛卡尔坐标系之间切换

Switch between polar and cartesian coordinate systems

开关单元

Switch units

Ctrl+U

Ctrl+U

切换英制和公制单位

Switch between imperial and metric units

撤销上次缩放

Undo Last Zoom

将缩放级别恢复到上次缩放操作之前的级别

Return zoom to level prior to last zoom action

解钉库

Unpin Library

不再将图书馆放在列表首位

No longer keep the library at the top of the list

根据原理图更新PCB…

Update PCB from Schematic…

F8

F8

根据原理图的更改更新PCB。

Update PCB with changes made to schematic

根据PCB更新原理图……

Update Schematic from PCB…​

根据PCB的更改更新原理图。

Update schematic with changes made to PCB

光标中心

Center on Cursor

F4

F4

缩放至对象

Zoom to Objects

Ctrl+Home

Ctrl+Home

缩放以适应

Zoom to Fit

Home

Home

缩放至选定对象

Zoom to Selected Objects

放大光标

Zoom In at Cursor

F1

F1

放大

Zoom In

水平放大

Zoom In Horizontally

水平放大绘图区域

Zoom in horizontally the plot area

垂直放大

Zoom In Vertically

垂直放大绘图区域

Zoom in vertically the plot area

缩小光标位置

Zoom Out at Cursor

F2

F2

缩小

Zoom Out

水平缩小

Zoom Out Horizontally

水平缩小绘图区域

Zoom out horizontally the plot area

垂直方向缩小

Zoom Out Vertically

垂直缩小绘图区域

Zoom out vertically the plot area

刷新

Refresh

F5

F5

缩放至选定区域

Zoom to Selection

Ctrl+F5

Ctrl+F5

嵌入式文件

Embedded Files

管理嵌入式文件

Manage embedded files

提取文件

Extract File

提取嵌入文件

Extract an embedded file

删除文件

Remove File

删除嵌入文件

Remove an embedded file

取消

Cancel

取消当前工具

Cancel current tool

复制

Copy

Ctrl+C

Ctrl+C

将选定项目复制到剪贴板

Copy selected item(s) to clipboard

复制为文本

Copy as Text

Ctrl+ Shift+C

Ctrl+Shift+C

将选定项目复制到剪贴板(文本格式)

Copy selected item(s) to clipboard as text

Cut

Ctrl+X

Ctrl+X

将选定项目剪切到剪贴板

Cut selected item(s) to clipboard

循环弧编辑模式

Cycle Arc Editing Mode

Ctrl+Space

Ctrl+Space

切换到另一种编辑弧线的方法

Switch to a different method of editing arcs

删除

Delete

Del

Del

删除所选项目

Delete selected item(s)

交互式删除工具

Interactive Delete Tool

删除已点击的项目

Delete clicked items

复制

Duplicate

Ctrl+D

Ctrl+D

复制选定的项目

Duplicates the selected item(s)

寻找

Find

Ctrl+F

Ctrl+F

查找和替换

Find and Replace

Ctrl+ Alt+F

Ctrl+Alt+F

查找下一个

Find Next

F3

F3

寻找下一个标记点

Find Next Marker

Ctrl+ Shift+F3

Ctrl+Shift+F3

查找上一个

Find Previous

Shift+F3

Shift+F3

结束

Finish

End

End

完成当前工具

Finish current tool

测量工具

Measure Tool

Ctrl+ Shift+M

Ctrl+Shift+M

交互式测量点之间的距离

Interactively measure distance between points

粘贴

Paste

Ctrl+V

Ctrl+V

从剪贴板粘贴项目

Paste item(s) from clipboard

粘贴特殊…

Paste Special…​

从剪贴板粘贴项目(带选项)

Paste item(s) from clipboard with options

重做

Redo

Ctrl+Y

Ctrl+Y

全部替换

Replace All

替换并查找下一个

Replace and Find Next

搜索

Search

Ctrl+G

Ctrl+G

显示/隐藏搜索面板

Show/hide the search panel

全选

Select All

Ctrl+A

Ctrl+A

选择屏幕上的所有项目

Select all items on screen

撤销

Undo

Ctrl+Z

Ctrl+Z

取消全部选择

Unselect All

Ctrl+ Shift+A

Ctrl+Shift+A

取消选中屏幕上的所有项目

Unselect all items on screen

选择行

Select Row(s)

选择包含当前选中单元格的整行或多行

Select complete row(s) containing the current selected cell(s)

选择列

Select Column(s)

选择包含当前选中单元格的完整列

Select complete column(s) containing the current selected cell(s)

选择表

Select Table

选择所选单元格的父表

Select parent table of selected cell(s)

选择项目

Select item(s)

关于 KiCad

About KiCad

配置路径…

Configure Paths…

编辑路径配置环境变量

Edit path configuration environment variables

Donate

在网页浏览器中打开“捐赠给 KiCad”

Open "Donate to KiCad" in a web browser

介入

Get Involved

在网页浏览器中打开“为 KiCad 做贡献”

Open "Contribute to KiCad" in a web browser

KiCad入门

Getting Started with KiCad

打开面向初学者的“KiCad入门指南”

Open “Getting Started in KiCad” guide for beginners

帮助

Help

在网页浏览器中打开产品文档

Open product documentation in a web browser

列出快捷键……

List Hotkeys…​

Ctrl+F1

Ctrl+F1

显示当前热键表及其对应的命令

Displays current hotkeys table and corresponding commands

偏好…

Preferences…​

Ctrl+,

Ctrl+,

显示所有打开工具的偏好设置

Show preferences for all open tools

报告错误

Report Bug

报告 KiCad 问题

Report a problem with KiCad

管理设计模块库……

Manage Design Block Libraries…​

编辑全局和项目设计块库列表

Edit the global and project design block library lists

管理足迹库……

Manage Footprint Libraries…​

编辑全局和项目足迹库列表

Edit the global and project footprint library lists

管理符号库…

Manage Symbol Libraries…

编辑全局和项目符号库列表

Edit the global and project symbol library lists

在后面添加列

Add Column After

在选定单元格后插入新的表格列

Insert a new table column after the selected cell(s)

在列之前添加列

Add Column Before

在选定单元格之前插入新的表格列

Insert a new table column before the selected cell(s)

上方添加行

Add Row Above

在选定单元格上方插入新的表格行

Insert a new table row above the selected cell(s)

在下方添加行

Add Row Below

在选定单元格下方插入新的表格行

Insert a new table row below the selected cell(s)

删除列

Delete Column(s)

删除包含当前选中单元格的列

Delete columns containing the currently selected cell(s)

删除行

Delete Row(s)

删除包含当前选中单元格的行

Delete rows containing the currently selected cell(s)

合并单元格

Merge Cells

将选定的表格单元格合并为一个单元格

Turn selected table cells into a single cell

取消合并单元格

Unmerge Cells

将合并的表格单元格恢复为单独的单元格。

Turn merged table cells back into separate cells.